Skip to content

Conversation

@tvalenciaz
Copy link
Contributor

@tvalenciaz tvalenciaz commented Mar 27, 2025

I think having the callback that does hub and spoke dict manipulation in generic_cylinders.py as a function within the model module is more convenient because that manipulation can be dependent on the value of the config options cfg. The same could be achieved by just also passing cfg to the callback the way it is written now but in the case where the user defines a class within their model module, having the callback be a method of the class makes cfg-dependent implementation straightforward.

Copy link
Collaborator

@bknueven bknueven left a comment

Choose a reason for hiding this comment

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

Happy to merge if we agree on passing the config object into the callback.

@bknueven bknueven enabled auto-merge May 1, 2025 20:01
@bknueven bknueven merged commit 45944b6 into Pyomo:main May 1, 2025
19 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.

2 participants