Hi
I have inherited a tennis league setup that runs summer and winter competitions. In each competition, there are mens, ladies and mixed leagues, each consisting of up to 6 teams. Each team plays the other home and away so there are 10 match days in each league. Each team is associated with a club and only has a certain number of courts available to play on. The fixtures were previously generated on a spreadsheet using trial and error, having to manually balance team' court availability.
I have created a solution using PHP and Berger tables to generate the fixtures which works but does give different output to if i used the spreadsheet. I have been looking at ways to automatically create the fixtures but can't see a pattern in the fixtures. You may have seen this previously or be able to spot a relevant pattern.
The first five rounds fixtures are below (rounds 6-10 are a reverse of this)
I can see that teams 1/2, 3/4 5/6 are never at home in the same week so am able to use this to account for teams sharing courts.
Can anyone see any pattern in the above that means i could build code to handle this?