Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with generate_expression() in Python3.6 #103

Closed
ghackebeil opened this issue Jan 16, 2017 · 4 comments
Closed

Problem with generate_expression() in Python3.6 #103

ghackebeil opened this issue Jan 16, 2017 · 4 comments
Labels

Comments

@ghackebeil
Copy link
Member

So far, I'm only seeing a problem when the summation function is used in an inequality expression. Example:

from pyomo.environ import *

model = ConcreteModel()
model.x = Var([1,2])
model.c = Constraint(expr= summation(model.x) >= 1)

This produces the following error:

  File "~/pyomo/core/base/expr_coopr3.py", line 1376, in _generate_relational_expression__clone_if_needed
    % ( count, ))
RuntimeError: Expression entered generate_relational_expression() with too few references (-1<0); this is indicative of a SERIOUS ERROR in the expression reuse detection scheme.
@ghackebeil ghackebeil added the bug label Jan 16, 2017
@greatestape
Copy link

I ran into this error running the transport example on 3.6

@aknaut
Copy link

aknaut commented Apr 5, 2017

I also ran into this error running the knapsack conrete example on a new Python 3.6.0 :: Anaconda 4.3.1 (64-bit) installation

@ghackebeil
Copy link
Member Author

For anyone coming across this issue, we have made a fix on master. Full support for Python 3.6 will be in the next release (hopefully sometime soon).

@ghackebeil
Copy link
Member Author

Fixed in 141c86e

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants