Skip to content

Consider adding parameter set for dual parameters #199

@klamike

Description

@klamike

When dualizing a parametric model, the current behavior is to add variables corresponding to primal parameters and to keep track of them in the primal_parameter_to_dual_parameter. I'd like to propose that dual models should constrain those dual parameters to the Parameter set with value matching that of the primal.

Consider

m = Model()
@variable m p  Parameter(1.0)
@variable m x
@constraint m c x  p
@objective m Min x
println(m)
print(dualize(m, dual_names=DualNames()))

which currently gives

Min x
Subject to
 c : -p + x  0
 p  MathOptInterface.Parameter{Float64}(1.0)

Max param_p*c
Subject to
 x : c = 1
 c  0

The problem is, directly optimizing this dual allows the solver to optimize param_p. To me that seems unnatural, since we told JuMP it is a parameter, not a decision variable, in the primal. Note that DualOptimizer seems to get around this somehow (I think it has to do with not allowing DIRECT mode which ends up always bridging the parameters prior to dualization?)

Under my proposal, Dualization would give the below dual, which retains the parameter value we set in the primal.

Max param_p*c
Subject to
 x : c = 1
 c  0
 param_p  MathOptInterface.Parameter{Float64}(1.0)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions