rtorok
- 2
- 0
Hoping to get some assistance here on a volunteer project I am working on.
I am writing a program for my bicyle club in preparation for our spring training series. We will have x participants that will be divided weekly into y number of (approximately) equal groups containing z members per groups (approximately x/y). This will go on for 12 weeks. The goal of my program is to optimize the diversity of the groups over the 12 weeks to ensure that each cyclist rides with as many different participants as possible over the course of the 12 weeks.
At the moment, I wrote an algorithm that in each week, works across the members of each group and transposes them across the groups of the following week as follows:
Week 1
---------
1,2,3
4,5,6
7,8,9
Week 2
--------
1,4,7
2,5,8
3,6,9
As the members are entered, to the extent that the member rode with another member assigned to the same group (starting that comparison analysis from the first week) the newest member is bounced to the next group and the comparison analysis is repeated. To the extent the member has riden with other members from every group, the member is relegated to the last available group with an opening.
For example, Week 3 would look as follows:
Week 3
--------
1,5,9
4,2,6
7,8,3
After a number of weeks, a very predictable pattern emerges. I am thinking there must be a better way.
I am wondering if someone on this forum can guide me to a methodology/algorithm that I can code that would provide for a more optimized diversification.
Your assistance is greatly appreciated.
I am writing a program for my bicyle club in preparation for our spring training series. We will have x participants that will be divided weekly into y number of (approximately) equal groups containing z members per groups (approximately x/y). This will go on for 12 weeks. The goal of my program is to optimize the diversity of the groups over the 12 weeks to ensure that each cyclist rides with as many different participants as possible over the course of the 12 weeks.
At the moment, I wrote an algorithm that in each week, works across the members of each group and transposes them across the groups of the following week as follows:
Week 1
---------
1,2,3
4,5,6
7,8,9
Week 2
--------
1,4,7
2,5,8
3,6,9
As the members are entered, to the extent that the member rode with another member assigned to the same group (starting that comparison analysis from the first week) the newest member is bounced to the next group and the comparison analysis is repeated. To the extent the member has riden with other members from every group, the member is relegated to the last available group with an opening.
For example, Week 3 would look as follows:
Week 3
--------
1,5,9
4,2,6
7,8,3
After a number of weeks, a very predictable pattern emerges. I am thinking there must be a better way.
I am wondering if someone on this forum can guide me to a methodology/algorithm that I can code that would provide for a more optimized diversification.
Your assistance is greatly appreciated.