Hi,
I have a difficult problem to solve.
Here is the description of the problem:
A certain number of teams of employees, which per default have to include a variable number of female and male members per team and each team should be filled automatically from a table of employees showing name and gender.
It would beneasy to loop through all teams from 1 to x and populate them, but if so, the first teams would be filled up and the later teams or the last teams would be empty maybe.
So this routine should populate the teams per random, considering the gender needed.
The teams could include allready some members too, meaning that for example
in team1, where the total of members should be 10, there are already 3 members, one female, two male. So team1 needs more 1 female and 6 male members to be complete. And so on.
Additionaly the total of possible members from table employees is less than the sum of all members needed jn all teams.
Example:
Team1 needs 2 female, 8 male, still no members
team2 needs 1 f, 12 m, 1 f plus 4 m already assigned
Team3 needs 8 m, 5 m already asigned.
Etc.
Total all teams 30 female, 70 male, 10 f plus 20 m already assigned.
Table employees has only 80 persons.
At the end each team should include about the same number of employees paying attention the required gender and the number of members which have been allready assigned before filling up the teams.
I hope to have described the problem to be understandable and I can get some help how to solve it.
Michael
I have a difficult problem to solve.
Here is the description of the problem:
A certain number of teams of employees, which per default have to include a variable number of female and male members per team and each team should be filled automatically from a table of employees showing name and gender.
It would beneasy to loop through all teams from 1 to x and populate them, but if so, the first teams would be filled up and the later teams or the last teams would be empty maybe.
So this routine should populate the teams per random, considering the gender needed.
The teams could include allready some members too, meaning that for example
in team1, where the total of members should be 10, there are already 3 members, one female, two male. So team1 needs more 1 female and 6 male members to be complete. And so on.
Additionaly the total of possible members from table employees is less than the sum of all members needed jn all teams.
Example:
Team1 needs 2 female, 8 male, still no members
team2 needs 1 f, 12 m, 1 f plus 4 m already assigned
Team3 needs 8 m, 5 m already asigned.
Etc.
Total all teams 30 female, 70 male, 10 f plus 20 m already assigned.
Table employees has only 80 persons.
At the end each team should include about the same number of employees paying attention the required gender and the number of members which have been allready assigned before filling up the teams.
I hope to have described the problem to be understandable and I can get some help how to solve it.
Michael