Skip to content

DualNames mapping rather than prefix #114

@matbesancon

Description

@matbesancon

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions