Closed Wikunia closed 4 years ago
The best bound can be way too optimistic if we have <= constraints. I.e
<=
m = Model(with_optimizer(CS.Optimizer)) @variable(m, 1 <= x[1:10] <= 9, Int) @constraint(m, sum(x) <= 25) @constraint(m, sum(x) >= 20) weights = [1,2,3,4,5,6,7,8,9,10] @objective(m, Max, sum(weights .* x)) optimize!(m)
The objective is currently only considering one change but by limiting the sum to 25 this can be reduced by looking at the constraints when calculating the best bound. Otherwise this will take forever...
Works when a greedy knapsack approach can be used.
The best bound can be way too optimistic if we have
<=
constraints. I.eThe objective is currently only considering one change but by limiting the sum to 25 this can be reduced by looking at the constraints when calculating the best bound. Otherwise this will take forever...