I want to create mip model which assign workers to entities. In case neighbour entities use same worker, objective should be increased by 1. A goal is to maximize total number of same workers for neighbour entities.
Since number of combinations can be large, I prefer integer variable to hold index of assigned worker (allowed only one worker per entity) to an entity. It works for me with usage of big M, boolean variable (assignment of concrete worker) is mapped to an index.
I don't how to map equality of indexes for two entities to boolean variable.
- e1.w = 1, e2.w = 1 imply 1
- e1.w = 2, e2.w = 1 imply 0
- e1.w = 2, e2.w = 2 imply 1
Is it possible to model it in mip ? Otherwise I have to for every possible combination of indexes create less or equal equation to trigger equality of workers.