- Janet 74.3%
- MiniZinc 13.7%
- CSS 11.9%
- Shell 0.1%
| img | ||
| src | ||
| www | ||
| LICENSE | ||
| README.org | ||
A way to find various arrangements of subgroups of a group…
install
To run these scripts you’ll need a working version of Janet and MiniZinc installed.
Once Janet is working, the minizinc-janet interface needs to be
installed.
jpm install https://codeberg.org/zzkt/minizinc-janet
schedule

If you have a fixed number of people and group sizes, the group-meeting script will generate the correct
number of rounds and group arrangements for everyone to meet each other
exactly once. It will also tell you if it is not possible for everyone
to meet exactly once.
# 9 people in groups of 3 (outputs 4 rounds)
janet group-meeting.janet 9 3
For more flexibility, the group-meeting-flex script will make arrangements
where there are varying groups sizes, and numbers of rounds. It will
generate a viable arrangement, and report if there are more people than
fit into the groups, or not enough people in each group. It can also
provide a summary of who has, or hasn't met each other.
For example, 9 people, arranged in 3 rounds. first round in groups of 3; second round with one group of 4 and one of 5; third round in a group of 9.
janet group-meeting-flex.janet --people 9 --rounds '3,3,3|4,5|9' --svg 'group-diagram.svg'
The output will look something like this…
Group configuration:
People: 9
Rounds: 3
R1: 3+3+3 = 9
R2: 4+5 = 9
R3: 9 = 9
Solver: cp-sat
Model: exact
Solving...
Status: :optimal-solution
Repeats: 25
Meeting Arrangement:
Round 1 (groups: 3, 3, 3):
Group 1: Aiko, Boris, Ingrid
Group 2: Deepa, Emeka, Fatima
Group 3: Chen, Gonzalo, Hiroshi
Round 2 (groups: 4, 5):
Group 1: Emeka, Fatima, Gonzalo, Hiroshi
Group 2: Aiko, Boris, Chen, Deepa, Ingrid
Round 3 (groups: 9):
Group 1: Aiko, Boris, Chen, Deepa, Emeka, Fatima, Gonzalo, Hiroshi, Ingrid
The rounds can be viewed from the perspective of each person…
Compact (name; group per round):
Aiko; 1, 2, 1
Boris; 1, 2, 1
Chen; 3, 2, 1
Deepa; 2, 2, 1
Emeka; 2, 1, 1
Fatima; 2, 1, 1
Gonzalo; 3, 1, 1
Hiroshi; 3, 1, 1
Ingrid; 1, 2, 1
There is also some info about who has met, and how many times…
Pair Coverage:
Total pairs: 36
Met: 36 (100%)
Exactly once: 16
More than once: 20
Repeated:
Emeka ↔ Fatima: 3
Deepa ↔ Emeka: 2
Aiko ↔ Ingrid: 3
Deepa ↔ Ingrid: 2
Chen ↔ Deepa: 2
Gonzalo ↔ Hiroshi: 3
Chen ↔ Hiroshi: 2
Aiko ↔ Boris: 3
Chen ↔ Ingrid: 2
Boris ↔ Deepa: 2
Boris ↔ Chen: 2
Fatima ↔ Gonzalo: 2
Emeka ↔ Hiroshi: 2
Fatima ↔ Hiroshi: 2
Aiko ↔ Deepa: 2
Deepa ↔ Fatima: 2
Emeka ↔ Gonzalo: 2
Aiko ↔ Chen: 2
Chen ↔ Gonzalo: 2
Boris ↔ Ingrid: 3
The script can also be given a list of names, separated by spaces.
janet group-meeting-flex.janet --rounds "4x4x5" --names Fidelia Marcus Donnette Garrett Lida Reagan Myrta Ginny Juliann Maxwell Serena Chantel Wen Malcom Lizbeth Aleida
Group configuration:
People: 16
Rounds: 5
R1: 4+4+4+4 = 16
R2: 4+4+4+4 = 16
R3: 4+4+4+4 = 16
R4: 4+4+4+4 = 16
R5: 4+4+4+4 = 16
Solver: cp-sat
Model: exact
Solving...
Status: :optimal-solution
Repeats: 0
Meeting Arrangement:
Round 1 (groups: 4, 4, 4, 4):
Group 1: Fidelia, Garrett, Reagan, Ginny
Group 2: Lida, Myrta, Chante, Aleida
Group 3: Donnette, Juliann, Wen, Lizbeth
Group 4: Marcus, Maxwell, Serena, Malcom
Round 2 (groups: 4, 4, 4, 4):
Group 1: Marcus, Garrett, Myrta, Wen
Group 2: Fidelia, Juliann, Maxwell, Aleida
Group 3: Reagan, Serena, Chante, Lizbeth
Group 4: Donnette, Lida, Ginny, Malcom
Round 3 (groups: 4, 4, 4, 4):
Group 1: Myrta, Ginny, Juliann, Serena
Group 2: Garrett, Lida, Maxwell, Lizbeth
Group 3: Fidelia, Marcus, Donnette, Chante
Group 4: Reagan, Wen, Malcom, Aleida
Round 4 (groups: 4, 4, 4, 4):
Group 1: Donnette, Reagan, Myrta, Maxwell
Group 2: Garrett, Juliann, Chante, Malcom
Group 3: Fidelia, Lida, Serena, Wen
Group 4: Marcus, Ginny, Lizbeth, Aleida
Round 5 (groups: 4, 4, 4, 4):
Group 1: Ginny, Maxwell, Chante, Wen
Group 2: Donnette, Garrett, Serena, Aleida
Group 3: Marcus, Lida, Reagan, Juliann
Group 4: Fidelia, Myrta, Malcom, Lizbeth
Compact (name; group per round):
Fidelia; 1, 2, 3, 3, 4
Marcus; 4, 1, 3, 4, 3
Donnette; 3, 4, 3, 1, 2
Garrett; 1, 1, 2, 2, 2
Lida; 2, 4, 2, 3, 3
Reagan; 1, 3, 4, 1, 3
Myrta; 2, 1, 1, 1, 4
Ginny; 1, 4, 1, 4, 1
Juliann; 3, 2, 1, 2, 3
Maxwell; 4, 2, 2, 1, 1
Serena; 4, 3, 1, 3, 2
Chante; 2, 3, 3, 2, 1
Wen; 3, 1, 4, 3, 1
Malcom; 4, 4, 4, 2, 4
Lizbeth; 3, 3, 2, 4, 4
Aleida; 2, 2, 4, 4, 2
Pair Coverage:
Total pairs: 120
Met: 120 (100%)
Exactly once: 120
More than once: 0
Partial arrangements can include people who are not allocated to a group, they are listed as 'Extra' and the groups may need to be adjusted manually. Consider the arragements as a starting point…
% janet group-meeting-flex.janet --people 5 --rounds '3x3x2'
Group configuration:
People: 5
Rounds: 2
R1: 3+3+3 = 9 [4 extra capacity]
R2: 3+3+3 = 9 [4 extra capacity]
Solver: cp-sat
Model: extras
Solving...
Status: :optimal-solution
Extras: 0
Repeats: 0
Meeting Arrangement:
Round 1 (groups: 2, 1, 2):
Group 1: Aiko, Emeka
Group 3: Chen, Deepa
Extra: Boris
Round 2 (groups: 1, 1, 3):
Group 3: Boris, Deepa, Emeka
Extra: Chen, Aiko
Compact (name; group per round):
Aiko; 1, 2
Boris; 2, 3
Chen; 3, 1
Deepa; 3, 3
Emeka; 1, 3
Pair Coverage:
Total pairs: 10
Met: 5 (50%)
Exactly once: 5
More than once: 0
Did not meet:
Aiko ↔ Boris
Aiko ↔ Chen
Aiko ↔ Deepa
Boris ↔ Chen
Chen ↔ Emeka
waiting
Some arrangements may not be possible, or take an extremely long time to produce an approximate solution
e.g.
% janet group-meeting-flex.janet --rounds "8x2x2" --names Fidelia Marcus Donnette Garrett Lida Reagan Myrta Ginny Juliann Maxwell Serena Chante Wen Malcom Lizbeth Aleida
Group configuration:
People: 16
Rounds: 2
R1: 8+8 = 16
R2: 8+8 = 16
Solver: cp-sat
Model: exact
Solving...
Status: :unknown
No solution found (time limit exceeded or unsolvable)