how to formulate an integer optimization problem using BINTPROG?

I want to formulate optimization using bintprog. My problem is:
I have total 9 numbers in the range [6000, 34000]. Addition of all these numbers is 190,000. Now I want to group these numbers in 5 categories such that sum of each category should not be more than 40,000. My objective is to
minimize sum(40,000 - [sum of category i]) where i = 1,2,3,4,5.
I guess my X should be 9-by-5 binary matrix, A is 1-by-9 matrix of those 9 numbers so that A*X will be a 1-by-5 matrix (sum of numbers in each category). But my B (A*X<=B) cannot be a row matrix (right?). Also, I am not sure if X should have more than one column. Please help!!!

1 Commento

I tried to solve it as a 5 different bintprog problems. For example, f=negative 9-by-1 of 9 numbers X=9-by-1 of zeros (starting point) A=-f' (making all number positive and taking transpose)
X=bintprog(f,A,40000) gave me X=[1,1,0,0,0,1,0,0,0]' and then I solved same problem for remaining 6 numbers until I formed 5 categories but i dont think it helps me to minimise the summation of(40,000 - [sum of category i]) where i = 1,2,3,4,5.

Accedi per commentare.

Risposte (0)

Categorie

Scopri di più su Optimization in Centro assistenza e File Exchange

Richiesto:

il 1 Mag 2013

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by