Hope someone can help me out here!
I have a table that holds a fixture list for various competitions. The teams are split into, normally, no more than 2 sections. Each section would then play in one of 2 sessions. A 'bye' team is added to even up the fixtures if required.
My problem is that only 4 games can be played in any one session. I have managed to split the teams into sections and allocate fixtures on a weekly basis, but need to be able to add a resource numbered 1-4 for each week and ensure that none of the resources is allocated more than once in any given week
The pseudo code would sort of be:
loop through the fixture list for week 1, allocate a resource number 1-4, When the week number changes loop again, When the section number changes start the whole thing again!
Not all resources need to be allocate ie Week 1 may have 3 games so resources 1,3 and 4 could be allocated or any other permutation. The only real restriction is that no resource can be used twice in the same week.
Any assistance will be greatfully received.
I have a table that holds a fixture list for various competitions. The teams are split into, normally, no more than 2 sections. Each section would then play in one of 2 sessions. A 'bye' team is added to even up the fixtures if required.
My problem is that only 4 games can be played in any one session. I have managed to split the teams into sections and allocate fixtures on a weekly basis, but need to be able to add a resource numbered 1-4 for each week and ensure that none of the resources is allocated more than once in any given week
The pseudo code would sort of be:
loop through the fixture list for week 1, allocate a resource number 1-4, When the week number changes loop again, When the section number changes start the whole thing again!
Not all resources need to be allocate ie Week 1 may have 3 games so resources 1,3 and 4 could be allocated or any other permutation. The only real restriction is that no resource can be used twice in the same week.
Any assistance will be greatfully received.
Last edited: