Skip to content

Conversation

@jsiirola
Copy link
Member

@jsiirola jsiirola commented May 5, 2023

Fixes

Summary/Motivation:

This PR introduces three significant things:

  • lp_v2 writer (pyomo.repn.pluvins.lp_writer): complete overhaul of the LP writer that is 30-40% faster
    • the new writer will complain about unrecognized active components (no more silently ignoring Disjunctions!)
    • the new writer will only emit the ONE_VAR_CONSTANT when it is required and will never emit the c_e_ONE_VAR_CONSTANT constraint (this lead to a lot of LP file baseline updates)
  • LinearRepn walker (pyomo.repn.linear): new expression compiler, roughly equivalent to generate_standard_repn(compute_values=True, quadratic=False)
  • QuadraticRepn walker (pyomo.repn.quadratic): new expression compiler, roughly equivalent to generate_standard_repn(compute_values=True, quadratic=True)

It also adds a lp_diff library for more robust comparisons of LP files (similar in structure to the nl_diff library). Both differs have been moved up to pyomo.repn.tests.

This PR activated the new writer as the default (and just updates all the baselines) in order to get full test coverage. If desired, we can go back and preserve multiple baselines to allow for a transition period.

Additional testing for the walkers will be forthcoming, but I wanted to get the PR up so people could start looking at it.

Performance:

image

Changes proposed in this PR:

  • see above

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.

jsiirola added 30 commits April 20, 2023 22:14
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.

4 participants