Skip to content

LinearStandardFormCompiler: allow_nonlinear and ignore_ctypes options#3963

Open
bknueven wants to merge 5 commits into
Pyomo:mainfrom
bknueven:lsfc-allow-flex-ctypes-nonlinear
Open

LinearStandardFormCompiler: allow_nonlinear and ignore_ctypes options#3963
bknueven wants to merge 5 commits into
Pyomo:mainfrom
bknueven:lsfc-allow-flex-ctypes-nonlinear

Conversation

@bknueven
Copy link
Copy Markdown
Contributor

Fixes # N/A

Summary/Motivation:

LinearStandardFormCompiler is a great tool for rapidly expanding a Pyomo model into the form need for (mixed-integer) linear programming solvers. Many of these solvers also handle quadratic constraints, SOS constraints, quadratic objectives, and even sometimes general nonlinear constraints and objectives. This PR would augment the LinearStandardFormCompiler to handle functional forms it cannot compile directly are either passed on or ignored and do not raise an error (new option allow_nonlinear and extra_valid_ctypes).

Changes proposed in this PR:

  • Add option for LinearStandardFormCompiler to return non-linear constraints / objectives it encounters instead of raising an error (option allow_nonlinear).
  • Add option for additional valid ctypes, to be handled by the caller. Useful for SOS constraints. (option ignore_ctypes)

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.

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.

1 participant