Hi all,

Can somebody please help me out here:
For the local field hockey club each year I have to create teams based on preferences that are provided by the players.
Is there a way to automatically create the teams based on the preferences of the players?

Here is some more background information:
The number of players vary each year as do the number of teams. Normally there will be two or three teams with each having 14, 15 or 16 players (depends on the total number of players). This year there is a total of 29 players from which two teams will be created, one team with 15 and one team with 14 players.

These are the rules:
  • - Each player can give a maximum of two names of other players in the list with whom they want to play in the team. (Preference 1, Preference 2). It is also possible that a player only gives one names or no names at all.
  • - Depending on the number of players two or three teams will be created. A teams must have the minimum of 14 players and a maximum of 16 players.
  • - Ideally both preferences of all players should be fulfilled. Where this is not possible at least Preference 1 should be granted. In the last case Preference 2 should be granted.
  • - Players that have not provided preferences can be placed in any of the teams.

Thanks in advance for your help and ideas.