You are running afoul of some operator overloading magic that we put into Pyomo a long time ago to support a ranged inequality syntax like “0 <= m.x <= 5”. That syntax has been problematic and will be removed in the future.
In this case, is m.n a Var or mutable Param? That would trigger the chained inequality logic. You can make the warning “go away” by explicitly extracting the current value of m.n:
if value(m.n) – 2E6 > 0:
Note that the Expression (m.f_s) will *not* change if m.n is later changed by either the user or a solver: rules are fired only when the model is constructed and are not callbacks.
john
--
You received this message because you are subscribed to the Google Groups "Pyomo Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
pyomo-forum...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/pyomo-forum/ddfe1dad-beea-469a-8cbd-0da7a4a47333%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
To unsubscribe from this group and stop receiving emails from it, send an email to pyomo...@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to pyomo...@googlegroups.com.
Minh,
I don’t see any “iterative solves” in the model you attached. In fact the only call to a solver is commented out. Did you attach the wrong model by mistake? Could you provide more detail on the problem you’re having?
Bethany
To unsubscribe from this group and stop receiving emails from it, send an email to
pyomo-forum...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/pyomo-forum/80484a56-07a6-46e3-a565-c63f57242e3c%40googlegroups.com.