I would like to pass this model to Dual but I still haven’t got it. Could someone help me?
Thank you!
using JuMP, Cbc, Dualization
FabricaBrinquedos = Model(dual_optimizer(Cbc.Optimizer))#When I try to compile using dual the model has an error
#FabricaBrinquedos = Model(with_optimizer(Cbc.Optimizer))
L = [12 ;60]
T = [0.25 0.1 0.1; 0.5 0.75 0.4]
D = [36; 22; 15]
@variable(FabricaBrinquedos, X[i=1:2] >= 0)
@objective(FabricaBrinquedos,Max,sum(L[i]*X[i] for i=1:2))
for j in 1:3
@constraint(FabricaBrinquedos, sum(X[i]*T[i,j] for i=1:2) <= D[j])
end
print(FabricaBrinquedos)
optimize!(FabricaBrinquedos) #Status model
println("Valor objetivo: ", JuMP.objective_value(FabricaBrinquedos))
status = FabricaBrinquedos# solves the model
println("valor: ", JuMP.value(X[i]) #
dual_model = dualize(FabricaBrinquedos, Cbc.Optimizer)