2020-10-02 14:54:08 +00:00
|
|
|
#lang racket
|
|
|
|
|
|
|
|
(require "group-scheduling.rkt")
|
|
|
|
|
|
|
|
;; define your group
|
|
|
|
|
2020-10-10 12:38:15 +00:00
|
|
|
(define some-group '("Fidelia" "Marcus" "Donnette" "Garrett" "Lida" "Reagan" "Myrta" "Ginny" "Juliann" "Maxwell" "Serena" "Chante" "Wen" "Malcom" "Lizbeth" "Aleida"))
|
|
|
|
|
2020-10-02 14:54:08 +00:00
|
|
|
;; the 'print-rounds' function determines if a particular arrangement of meetings
|
|
|
|
;; will nable everyon ein th egrouo to have met once.
|
|
|
|
|
|
|
|
;; it's given a group (i.e. a list of names) and the number of rounds of 2, 3 or 4
|
|
|
|
;; first. number of rounds of pairs
|
|
|
|
;; second. number of rounds of 3 person groups
|
|
|
|
;; third. number of rounds of 4 person groups
|
|
|
|
|
|
|
|
|
|
|
|
;; show the scenario for week 1
|
2020-10-10 12:38:15 +00:00
|
|
|
(print-test-rounds some-group 2 1 1)
|
2020-10-02 14:54:08 +00:00
|
|
|
|
|
|
|
|
|
|
|
;; begin with seting up the meetings
|
2020-10-10 12:38:15 +00:00
|
|
|
(start-meetings some-group)
|
2020-10-02 14:54:08 +00:00
|
|
|
|
|
|
|
;; make a few rounds...
|
2020-10-10 12:38:15 +00:00
|
|
|
(print-rounds-of-2 some-group 2)
|
|
|
|
(print-rounds-of-3 some-group 2)
|
|
|
|
(print-rounds-of-4 some-group 1)
|
|
|
|
(print-all-meetings some-group)
|
2020-10-02 14:54:08 +00:00
|
|
|
|
|
|
|
;; and again...
|
2020-10-10 12:38:15 +00:00
|
|
|
(reset-meetings some-group)
|
2020-10-02 14:54:08 +00:00
|
|
|
|
2020-10-10 12:38:15 +00:00
|
|
|
(print-rounds-of-2 some-group 2)
|
|
|
|
(print-all-meetings some-group)
|
2020-10-02 14:54:08 +00:00
|
|
|
|
|
|
|
|
|
|
|
;; ...and by end of week 2
|
|
|
|
(printf "\nweek 1 & week 2 (scenario 1)\n\n")
|
2020-10-10 12:38:15 +00:00
|
|
|
(print-test-rounds some-group 5 2 1)
|
2020-10-02 14:54:08 +00:00
|
|
|
|
|
|
|
(printf "\nweek 1 & week 2 (scenario 2)\n\n")
|
2020-10-10 12:38:15 +00:00
|
|
|
(print-test-rounds some-group 4 3 1)
|
2020-10-02 14:54:08 +00:00
|
|
|
|
|
|
|
(printf "\nweek 1 & week 2 (scenario 3)\n\n")
|
2020-10-10 12:38:15 +00:00
|
|
|
(print-test-rounds some-group 4 2 2)
|
2020-10-02 14:54:08 +00:00
|
|
|
|
|
|
|
(printf "\nweek 1 & week 2 (scenario 4)\n\n")
|
2020-10-10 12:38:15 +00:00
|
|
|
(print-test-rounds some-group 4 1 3)
|
2020-10-02 14:54:08 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|