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

Bug due to mismatch with dual sign convention #123

Closed
blegat opened this issue Jun 25, 2021 · 0 comments · Fixed by #121
Closed

Bug due to mismatch with dual sign convention #123

blegat opened this issue Jun 25, 2021 · 0 comments · Fixed by #121
Assignees
Labels
bug Something isn't working

Comments

@blegat
Copy link
Member

blegat commented Jun 25, 2021

In this line:

dQ * z + dq + dG' * λ + dA' * ν

This should be - dA' * ν even if it is + dA' * ν because ν is the MOI dual which is the opposite as the dual used in the paper.
We should probably reverse ν when we get the dual so that we don't have these complications.
This sign was correctly reversed here:

DiffOpt.jl/src/diff_opt.jl

Lines 467 to 472 in 6a74501

# this is the previously implemented
return dν[i] * z[j] - ν[i] * dz[j]
# from the paper, teh correct solution should be this
# and thec correct fix is probably correcting the signs of the duals
# since MOI standard is different from text book shadow prices
# return dν[i] * z[j] + ν[i] * dz[j]

@blegat blegat added the bug Something isn't working label Jun 25, 2021
@blegat blegat self-assigned this Jun 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Development

Successfully merging a pull request may close this issue.

1 participant