-
Notifications
You must be signed in to change notification settings - Fork 517
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
Improve conversions between Pyomo and Sympy expressions #2806
Conversation
…ional expression nodes
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## main #2806 +/- ##
==========================================
+ Coverage 87.01% 87.04% +0.02%
==========================================
Files 763 763
Lines 87276 87312 +36
==========================================
+ Hits 75943 75998 +55
+ Misses 11333 11314 -19
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 3 files with indirect coverage changes Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report in Codecov by Sentry. |
Fixes #2802, fixes #2803.
Summary/Motivation:
This PR improves support for converting Pyomo expressions to/from Sympy expressions. In particular:
cnf_walker
: the CNF walker now builds on the general walker fromsympy_tools
(eliminates a significant amount of repeated code)This also improves error checking in the
core.logical_to_linear
transformation. In particular, attempts to transform LogicalConstraints containing relational expressions will generate an exception (fixes #2802).Changes proposed in this PR:
Legal Acknowledgement
By contributing to this software project, I have read the contribution guide and agree to the following terms and conditions for my contribution: