-
Notifications
You must be signed in to change notification settings - Fork 94
[Bridges] pass variable names through ParameterToEqualToBridge #2821
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
Conversation
This is actually not as easy as I thought. |
I'm not convinced we should merge this, but if we close this, we should also close #2762 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like the behavior. This is extremely useful for debugging models with parameters.
I'll let @blegat decide what we should do |
end | ||
vi_bridged = get(b.name_to_var, name, nothing) | ||
MOI.Utilities.throw_if_multiple_with_name(vi_bridged, name) | ||
if _get_variable_if_equivalent(b, vi_bridged) !== nothing |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is this for ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe add a comment explaining
I think that in general, bridge could optionally implement names, just the same way they can optionally implement any attribute. |
This seems reasonable. |
Sorry if I wasn't clear, I meant that since it only makes sense to implement it for a bridge that maps a function identically, this PR is the way to go |
I went for the explicit support option in #2822 |
Closing in favor of #2822 |
Closes #2762
But I'm not 100% sure we should merge this. It's really just a single special case. It isn't obvious what naming convention we should use if the map is
y := Ax + b
.