In a model, I want to relax one binary variable.
relax_integrality(model)
relaxes all variables of the model, so I think the right way to go will be to use unset_binary
as shown in the example below.
model = Model()
@variable(model, x[1:2], Bin)
@objective(model, Min, x[1] + x[2])
unset_binary(x[2])
set_lower_bound(x[2],0)
set_upper_bound(x[2],1)
What is the correct way to use unset_binary
when working with DenisAxisArrays? For example, assume that indices of the vector x, are x[A1] and x[A2] and I want to relax x[A2]. Using the above code unset_binary(x[A2]) throws an error that x[A2] is not defined.