Skip to content
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

[Bridges] add SlackBridgePrimalDualStart #2194

Merged
merged 7 commits into from Jun 11, 2023
Merged

[Bridges] add SlackBridgePrimalDualStart #2194

merged 7 commits into from Jun 11, 2023

Conversation

odow
Copy link
Member

@odow odow commented Jun 8, 2023

x-ref jump-dev/JuMP.jl#3271

@blegat, it seemed to me that we would never want to set this to something other than -1 for the dual and 0 for the slack primal, so I opted to consolidate everything into a single attribute.

Does this seem right? Or am I missing something?

@odow odow added the Submodule: Bridges About the Bridges submodule label Jun 8, 2023
@odow odow requested a review from blegat June 8, 2023 04:39
@assert value
# ConstraintDual: if the objective function had a dual, it would be `-1` for
# the Lagrangian function to be the same.
if MOI.supports(model, MOI.ConstraintDualStart(), typeof(b.constraint))
Copy link
Member

Choose a reason for hiding this comment

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

This does not seem right, we should get an UnsupportedAttribute error if it's not supported.
We should implement supports for the bridge so that it returns false if the constraint type does not support it. That way, it would be ignored by copy_to ?

Copy link
Member Author

Choose a reason for hiding this comment

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

We only ignore the Name attribute. This is a special case because we want to pretend that every solver supports it.

Copy link
Member

Choose a reason for hiding this comment

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

Indeed, maybe drop a comment here so that people see it's not the common way of handling starting values and it's not copy-pasted out of context

Copy link
Member Author

Choose a reason for hiding this comment

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

Done

@blegat
Copy link
Member

blegat commented Jun 8, 2023

I would also assume it to always be -1, unless with some kind of homogeneization but if it's not, we can still add the two attributes of jump-dev/JuMP.jl#3271 for a more fine-graine access without being breaking

@odow
Copy link
Member Author

odow commented Jun 8, 2023

Yeah. Or support passing something other than nothing, like (primal_slack, dual).

@odow odow merged commit 6b2192a into master Jun 11, 2023
12 checks passed
@odow odow deleted the od/slack-start branch June 11, 2023 20:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Submodule: Bridges About the Bridges submodule
Development

Successfully merging this pull request may close these issues.

None yet

2 participants