Hi,
I have a a number of people which have to go into rooms in pairs. If two people know each other they cannot go into the same room (and some cost function to maximize). I was trying to use intlinprog and having the solution vector be the people, where the value of the vector at each position is the room each person goes to.
Eg:
x1 (Joe)x2 (Mary)
There are 3 rooms. So the bounds are:
1 <= x1,x2 <= 3
Joe knows Mary so my constraint would be:
x1-x2 != 0
Since they have to go to different rooms. How do I add this constraint to intlinprog? Any light shed on this ways to solve this problem would be greatly appreciated.
Best Answer