Skip to content

Support initialization of indexed Set from scalar functions returning dicts #3664

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 19 commits into from
Jul 18, 2025

Conversation

jsiirola
Copy link
Member

Fixes # .

Summary/Motivation:

This is an extended version of #3363: merging this PR will automatically merge & close #3363. See the original PR for an excellent discussion / motivation.

This updated PR contains some minor changes to the original:

  • resolve errors when initializing abstract sets from external data
  • clarify some changes to the Set documentation
  • resolve conflicts with the current state of main

As part of going through this PR, it became apparent that a larger PR should be put together that standardizes how we resolve Initializers in this context (for example, a similar change should probably be added to handling dimen and domain). However, that change started to become more involved, so I am proposing that we fix the current issue here and defer a more general update to the initializers (including finally propagating the use of Initializer to the rest of the Components) to a subsequent PR.

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.

@jsiirola jsiirola requested review from mrmundt and blnicho July 17, 2025 13:53
Copy link
Contributor

@mrmundt mrmundt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A+ updates to the docs.

@blnicho blnicho merged commit e9cfccd into Pyomo:main Jul 18, 2025
86 of 91 checks passed
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