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

NLv2 presolver: resolve constant defined vars/external functions #3276

Merged
merged 34 commits into from
May 29, 2024

Conversation

jsiirola
Copy link
Member

Fixes #3272 .

Summary/Motivation:

This resolves a number of errors and bugn in the NLv2 linear presolver:

  • The ASL does not handle defined variables and external functions with constant subexpressions. This PR will simplify nonlinear subexpressions (within defined variables or arguments to external functions) to a single number (if fixing variables results in the subexpression becoming constant).
  • improve detection of trivially infeasible models

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:

  1. I agree my contributions are submitted under the BSD license.
  2. I represent I am authorized to make the contributions and grant the license. If my employer has rights to intellectual property that includes these contributions, I represent that I have received permission to make contributions and grant the required license on behalf of that employer.

… leaf-to-root, unnamed subexpressions will be handled correctly
pyomo/repn/plugins/nl_writer.py Show resolved Hide resolved
pyomo/repn/plugins/nl_writer.py Show resolved Hide resolved
pyomo/repn/plugins/nl_writer.py Show resolved Hide resolved
pyomo/repn/plugins/nl_writer.py Outdated Show resolved Hide resolved
pyomo/repn/plugins/nl_writer.py Show resolved Hide resolved
pyomo/repn/tests/ampl/test_nlv2.py Show resolved Hide resolved
pyomo/repn/tests/ampl/test_nlv2.py Outdated Show resolved Hide resolved
@blnicho blnicho merged commit 83066f8 into Pyomo:main May 29, 2024
29 of 30 checks passed
@jsiirola jsiirola deleted the nlv2-presolve-defined-vars branch May 29, 2024 21:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

NL writer linear presolver not detecting infeasibility
3 participants