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

DualNames mapping rather than prefix #114

Open
matbesancon opened this issue Jun 29, 2021 · 0 comments
Open

DualNames mapping rather than prefix #114

matbesancon opened this issue Jun 29, 2021 · 0 comments
Labels
good first issue Good for newcomers help wanted Extra attention is needed

Comments

@matbesancon
Copy link
Contributor

This could be an alternative structure to DualNames rather than a replacement:
a DualNameMapping that takes pairs "pattern1" => "pattern2" and maps the first to the second for names.
Example:

m = Model()
# ...
@constraint(m, affine_cons[j=1:3],
    λ - c[j] >= dot(Cs[j], As[1])
)
Dualization.dualize(m,
dual_mapping=DualNameMapping("affine_cons" => "α")
)

resulting in a dual model with a constraint

λ : α[1]_1 + α[2]_1 + α[3]_1 = 1.0
# instead of
λ : dualaffine_cons[1]_1 + dualaffine_cons[2]_1 + dualaffine_cons[3]_1 = 1.0
@guilhermebodin guilhermebodin added good first issue Good for newcomers help wanted Extra attention is needed labels Jan 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers help wanted Extra attention is needed
Development

No branches or pull requests

2 participants