When using Dualization.jl to dualize an LP, I used the ignore_objective
argument to turn off the objective. However, I received the following error:
ERROR: MethodError: no method matching dualize(::Model, ::Nothing; dual_names=DualNames("dual_", "dual_", "", ""), ignore_objective=true, consider_constrained_variables=false)
Closest candidates are:
dualize(::Model, ::Any; dual_names) at /Users/chengguo/.julia/packages/Dualization/cjSlF/src/dualize.jl:197 got unsupported keyword arguments "ignore_objective", "consider_constrained_variables"
dualize(::Model) at /Users/chengguo/.julia/packages/Dualization/cjSlF/src/dualize.jl:197 got unsupported keyword arguments "dual_names", "ignore_objective", "consider_constrained_variables"
Stacktrace:
[1] kwerr(::NamedTuple{(:dual_names, :ignore_objective, :consider_constrained_variables), Tuple{DualNames, Bool, Bool}}, ::Function, ::Model, ::Nothing)
@ Base ./error.jl:157
[2] top-level scope
@ ~/Dropbox/codes_sync/expansion_mechanism/codes/jl_code/try_dualize.jl:25```
Here is my code:
using JuMP, Dualization
m = Model()
@variable(m, x >= 0)
@variable(m, y >= 0)
@constraints(m, begin
con1, 3 * x + 2 * y >= 9
con2, 2 * x + y >= 6
ub, x <= 2
end)
@objective(m, Min, 8 * x + 10 * y)
dual_m = Dualization.dualize(
m;
dual_names = DualNames("dual_", "dual_"),
ignore_objective = true,
consider_constrained_variables = false,
)
I saw the same usage in the source code of BilevelJuMP.jl, so I am confused why I got the error. Any insights?
Version Info:
Julia: 1.6.3
JuMP: 1.11.0
Dualization.jl: 0.5.7