Skip to content

Forward custom objective attributes in their bridge context - #381

Open
blegat wants to merge 1 commit into
masterfrom
bl/objective-bridge-context
Open

blegat wants to merge 1 commit into
masterfrom
bl/objective-bridge-context

Conversation

@blegat

@blegat blegat commented Nov 12, 2026

Copy link
Copy Markdown
Member

Enter MOI.Bridges.call_in_context when forwarding objective function attributes through objective bridges. Both forward setters and reverse getters can access a slack constraint that is itself bridged; ownership tracking correctly hides that child from public calls, so forwarding outside the objective context raised InvalidIndex.

Depends on the ObjectiveFunction overload of call_in_context added by jump-dev/MathOptInterface.jl#3130

Enter MOI.Bridges.call_in_context when forwarding objective function attributes through objective bridges. Both forward setters and reverse getters can access a slack constraint that is itself bridged; ownership tracking correctly hides that child from public calls, so forwarding outside the objective context raised InvalidIndex.

Depends on the ObjectiveFunction overload of call_in_context added by MathOptInterface PR #3130. Test both directions with a hidden, sign-flipped slack child and verify its visibility and context restoration. The complete modified bridge test file passes with normal compilation, including its allocation assertions, and the previously failing trivial-QP test passes all 64 checks through forward and reverse differentiation. Temporary line/type traces verify affine and quadratic objective routes. JuliaFormatter leaves no diff.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant