I am looking for an algorithm to find the optimal matching/allocation of n individuals in m identical vehicles. The aim is to create groups of individuals who will share these vehicles. Groups' size is bounded.
An individual i has incomplete preferences over the other individuals (some are not included into i's preference list when i can't share a vehicle with them).
I am looking for an algorithm returning a stable matching and minimizing the global cost for all individuals (cost for individual i being defined as the sum of the index of the individuals sharing i's vehicle in i's preference list).