Skip to content

Support "default" dispatchers in ExitNodeDispatcher #3194

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

Merged
merged 7 commits into from
Apr 2, 2024

Conversation

jsiirola
Copy link
Member

Fixes # .

Summary/Motivation:

This PR significantly simplifies the definition of the ExitNodeDispatcher lookup tables by allowing a "default" handler for each node type. In particular, this significantly simplifies the construction of derived dispatchers (like the quadratic dispatcher).

Changes proposed in this PR:

  • support declaring a "default" exit node handler for each node type
  • propagate through the linear and quadratic ExitNodeDispatcher
  • update the ExitNodeDispatcher.__missing__ to cleanly handle fallback from argument-specific handlers to the default handler

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.

@blnicho blnicho requested a review from emma58 March 26, 2024 18:47
@blnicho blnicho merged commit 69082ac into Pyomo:main Apr 2, 2024
33 checks passed
@jsiirola jsiirola deleted the dispatcher-simplification branch April 4, 2024 04:46
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