scheduling/README.org

115 lines
3.2 KiB
Org Mode
Raw Normal View History

# -*- mode: org; coding: utf-8; -*-
#+title: scheduling and grouping
A way to find various subgroups of a group…
* install
To run this programme youll need a working version of [[https://racket-lang.org/][Racket]] installed (an installer can be downloaded [[https://download.racket-lang.org/][here]])
on macOS
#+BEGIN_SRC shell
brew cask install racket
#+END_SRC
on debian/ubuntu
#+BEGIN_SRC shell
sudo apt intall racket
#+END_SRC
you might also need to install the ~control~ library
#+BEGIN_SRC shell
raco pkg install control
#+END_SRC
* schedule
[[https://the-public-domain-review.imgix.net/collections/amundsen-s-south-pole-expedition/6504423149_f4ffeb13b8_o.jpg]]
setup…
#+BEGIN_SRC racket
(require "group-scheduling.rkt")
#+END_SRC
define your group as a list of names (or similar)…
#+BEGIN_SRC racket
(define fmba-group '("Fidelia" "Marcus" "Donnette" "Garrett" "Lida" "Reagan" "Myrta" "Ginny" "Juliann" "Maxwell" "Serena" "Chante" "Wen" "Malcom" "Lizbeth" "Aleida"))
#+END_SRC
the =print-test-rounds= function determines if a particular arrangement of meetings will enable everyone in the group to meet once….
it's given a group (i.e. a list of names) and the number of rounds of 2, 3 or 4 people
- first. number of rounds of pairs
- second. number of rounds of 3 person groups
- third. number of rounds of 4 person groups
So 2 rounds of pairs, one round of groups of 3 and one round of groups of 4 would look like this…
#+BEGIN_SRC racket
(print-test-rounds fmba-group 2 1 1)
#+END_SRC
begin with setting up the meetings
#+BEGIN_SRC racket
(start-meetings fmba-group)
#+END_SRC
make a few rounds…
#+BEGIN_SRC racket
(print-rounds-of-2 fmba-group 2)
(print-rounds-of-3 fmba-group 2)
(print-rounds-of-4 fmba-group 1)
(print-all-meetings fmba-group)
#+END_SRC
reset the meetings (i.e. forget who has net who) and go again…
#+BEGIN_SRC racket
(reset-meetings fmba-group)
#+END_SRC
#+BEGIN_SRC racket
(print-rounds-of-2 fmba-group 2)
#+END_SRC
show who has met in the meetings that have happened…
#+BEGIN_SRC racket
(print-all-meetings fmba-group)
#+END_SRC
try a few scenarios…
Week 1: 3x rounds of 2, 1x round of 3
Week 2: 2x rounds of 2, 1x round of 3, 1x round of 4
Week 3: 2x rounds of 2, 1x round of 3, 1x round of 4
Week 4: 2x rounds of 2, 2x rounds of 4
which looks like…
#+BEGIN_SRC racket
(print-test-rounds fmba-group 3 1 0)
(print-test-rounds fmba-group 2 1 1)
(print-test-rounds fmba-group 2 1 1)
(print-test-rounds fmba-group 2 0 2)
#+END_SRC
and test some other scenarios…
#+BEGIN_SRC racket
(printf "\nweek 1 & week 2 (scenario 1)\n\n")
(print-test-rounds fmba-group 5 2 1)
(printf "\nweek 1 & week 2 (scenario 2)\n\n")
(print-test-rounds fmba-group 4 3 1)
(printf "\nweek 1 & week 2 (scenario 3)\n\n")
(print-test-rounds fmba-group 4 2 2)
(printf "\nweek 1 & week 2 (scenario 4)\n\n")
(print-test-rounds fmba-group 4 1 3)
#+END_SRC
* further
- [[https://arxiv.org/abs/cs/0011047][Dancing Links]], [[https://www.geeksforgeeks.org/exact-cover-problem-algorithm-x-set-1/][Exact Cover Problem and Algorithm X]]
- [[https://en.wikipedia.org/wiki/Size_of_groups,_organizations,_and_communities][Size of groups, organizations, and communities]]
- etc+