Compare commits

..

7 Commits

Author SHA1 Message Date
Margot Sauter
d329748b89 Weekend 19 2024-11-10 19:28:37 +01:00
fb03d1a3ba
Update nix-shell line 2024-01-06 20:20:14 +01:00
17731a1032
Add "each person has at least 1 task" constraint 2024-01-06 20:19:46 +01:00
Sjors Gielen
d5b1309ef5 Gitignore 2023-12-31 17:33:22 +01:00
Sjors Gielen
ffcc39ae20 Weekend 18 2023-12-31 17:33:02 +01:00
Margot Sauter
ca54fd636d Weekend 16 2023-03-08 09:50:13 +01:00
Margot Sauter
8ff6ffa559 W15 2022-11-24 20:39:57 +01:00
5 changed files with 99 additions and 100 deletions

3
.gitignore vendored Normal file
View File

@ -0,0 +1,3 @@
__pycache__
data
output

View File

@ -4,102 +4,99 @@ config:
likes: 1 likes: 1
hates: 3 hates: 3
# TODO: load_dev # TODO: load_dev
ignore: [] ignore: [-]
task_re: "[ ,/]+" task_re: "[ ,/]+"
tasks: tasks:
hotemetoten: hotemetoten:
personen: [MrNGm, Pepper, Joost, Annelies] personen: [Lyra, mrngm, Pepper]
workload: 4 workload: 4
req: [1, 1, 1] req: [1, 1, 1]
hardcode: hardcode:
- MrNGm - Lyra
# - Pepper - mrngm
- Joost - Pepper
- Annelies
lookup: [hotemetoten] lookup: [hotemetoten]
superkok: superkok:
req: [1, 1, 1] req: [1, 1, 1]
personen: [lynn, pepper, Wassasin] personen: [MacGyver, Annelies, Mieksies]
workload: 4 workload: 4
lookup: [superkok] lookup: [superkok]
hardcode: hardcode:
- Pepper - MacGyver
- Wassasin - Annelies
- lynn - Mieksies
drankmanagen: snijden:
req: [1, 1, 1] req: [2, 3, 3]
personen: [MacGyver] workload: 2
workload: 1 personen: iedereen
lookup: [drankmanagen] lookup: [snijden]
koken: koken:
req: [2, 3, 2] req: [3, 3, 3]
workload: 3 workload: 3
personen: liefhebbers personen: liefhebbers
lookup: [koken, kookhulp, hulpkoken] lookup: [koken, kookhulp, hulpkoken]
afwassen:
req: [3, 6, 6]
workload: 2
personen: iedereen
lookup: [afwassen]
schoonmaken: schoonmaken:
req: [3, 4, 4] req: [2, 4, 4]
workload: 2 workload: 2
personen: iedereen personen: iedereen
lookup: [schoonmaken] lookup: [schoonmaken]
snackdealen: snackdealen:
req: [4, 5, 5] req: [2, 4, 4]
workload: 1 workload: 1
personen: iedereen personen: iedereen
lookup: [hapjes, snackdealen] lookup: [hapjes, snackdealen]
fotograferen: fotograferen:
req: [2, 2, 2] req: [2, 3, 3]
workload: 1 workload: 2
personen: liefhebbers personen: liefhebbers
lookup: [fotograferen] lookup: [fotograferen]
afwassen:
req: [4, 4, 4]
workload: 2
personen: iedereen
lookup: [afwassen]
snijpieten:
req: [3, 4, 4]
workload: 2
personen: iedereen
lookup: [snijden]
pendelen: pendelen:
req: [2, 1, 2] req: [1, 1, 1]
workload: 2 workload: 2
personen: liefhebbers personen: liefhebbers
lookup: [pendelen] lookup: [pendelen]
people: people:
- Pepper
- Joost
- MrNGm
- Annelies
- Wassasin
- lynn
- Roflincopter
- lucus
- Weasel
- ElizaAntoine
- Lyra
- MacGyver
- Abel - Abel
- SyntaxTerror - Anita
- carrot - Annelies
- Blondie - Blondie
- Bwesterb - carrot
- M-ou-se - Dusk
- PaxSum - Eliza
- Petervdv - Harm
- John
- Joost
- Leonie
- lynn
- Loki
- lucus
- Lyra
- Maaike
- Mabl
- MacGyver
- mapzie
- Margot - Margot
- Daan - Marion
- Laurens
- yorick
- Minnozz
- Sjors
- Quis
- Nova
- Marlon - Marlon
- Aaron - Mieksies
- AlphaCentauri - Minnozz
- BOBMarlie - MrNGm
- Martijn - Nova
- Colin - PaxSum
- Blu - Pepper
- Hannah - petervdv
- Quis
- Rian
- Roflincopter
- Sjors
- SyntaxTerror
- Tanja
- Thom
- Wassasin
- Weasel
- Yorick

View File

@ -1,12 +1,12 @@
#! /usr/bin/env nix-shell #! /usr/bin/env nix-shell
#!nix-shell -i python3 -p python python3Packages.pyyaml glpk #!nix-shell -i python3 -p python3 python3Packages.pyyaml glpk -I nixpkgs=flake:nixpkgs
import sys import sys
import yaml import yaml
import re import re
import subprocess import subprocess
from collections import OrderedDict from collections import OrderedDict
import glpm import glpm
conf = yaml.load(open('config.yaml', 'r')) conf = yaml.safe_load(open('config.yaml', 'r'))
config = conf['config'] config = conf['config']
config['ignore'].append('') config['ignore'].append('')
tasks = OrderedDict(conf['tasks']) tasks = OrderedDict(conf['tasks'])

View File

@ -18,7 +18,6 @@ set D := 1..D_count;
/* aanwezigheid x workload for that day */ /* aanwezigheid x workload for that day */
param Costs{p in P}, integer, >= 0; param Costs{p in P}, integer, >= 0;
/* Person p likes to solve jobs j */ /* Person p likes to solve jobs j */
param L{p in P, j in J} default 0, binary; param L{p in P, j in J} default 0, binary;
@ -49,8 +48,8 @@ s.t. hardcode{p in P, j in J, d in D}: A[p,j,d] >= Q[p,j,d];
/* A person only has one task per day, at most */ /* A person only has one task per day, at most */
s.t. max_load_person{p in P, d in D}: sum{j in J} A[p,j,d] <= max_load[p,d]; s.t. max_load_person{p in P, d in D}: sum{j in J} A[p,j,d] <= max_load[p,d];
/* A person has at least D-1 tasks */ /* A person has at least 1 task */
#s.t. min_load_person{p in P}: sum{j in J, d in D} A[p,j,d] >= min_load[p]; s.t. min_load_person{p in P}: sum{j in J, d in D} A[p,j,d] >= 1;
/* A person does not perform the same job on all days */ /* A person does not perform the same job on all days */
/* s.t. duplicate_jobs{p in P, j in J}: sum{d in D} A[p,j,d] <= D_count-1; */ /* s.t. duplicate_jobs{p in P, j in J}: sum{d in D} A[p,j,d] <= D_count-1; */

View File

@ -1,31 +1,31 @@
Pepper koken, snijden fotograferen, snackdealen Abel - pendelen
Joost afwassen, koken, snijden fotograferen, snackdealen Anita schoonmaken, afwassen fotograferen, pendelen
Annelies afwassen, fotograferen, pendelen koken, snijden, snackdealen carrot koken, snijden -
Laurens pendelen, koken, snijden schoonmaken Dusk pendelen, snijden, koken afwassen, schoonmaken
Weasel fotograferen, koken, snijden snackdealen, schoonmaken Eliza schoonmaken, koken, snijden snackdealen, pendelen, afwassen
Martijn koken, snijden schoonmaken, afwassen Harm pendelen, fotograferen snackdealen, schoonmaken
PaxSum koken, snijden, afwassen fotograferen, snackdealen Joost snijden fotograferen, pendelen, schoonmaken, snackdealen
petervdv snackdealen, pendelen koken, afwassen, schoonmaken, fotograferen Leonie koken, snijden, pendelen snackdealen, fotograferen
Lyra fotograferen, afwassen, snijden pendelen Loki snijden, koken, snackdealen afwassen, schoonmaken
Nova pendelen, koken, snijden fotograferen, schoonmaken, snackdealen lucus koken, snijden schoonmaken, snackdealen
ElizaAntoine afwassen, schoonmaken, fotograferen koken, snijden, snackdealen, pendelen lynn koken, snackdealen, schoonmaken afwassen, snijden, koken
SyntaxTerror fotograferen, snijden, afwassen koken, snackdealen, pendelen Maaike snijden, koken, afwassen snackdealen, fotograferen, pendelen
AlphaCentauri snackdealen, schoonmaken, afwassen koken, pendelen, snijden Mabl snijden, schoonmaken fotograferen, pendelen, snackdealen
Daan pendelen, fotograferen afwassen, schoonmaken mapzie snackdealen snijden, koken, schoonmaken, afwassen
Lucus koken, snijden, afwassen fotograferen, schoonmaken Margot snijden, koken, afwassen snackdealen, schoonmaken
Abel fotograferen, snijden, afwassen schoonmaken, koken Marion snijden, koken, afwassen snackdealen, fotograferen, schoonmaken
yorick snijden, afwassen fotograferen, schoonmaken Marlon koken, snijden afwassen, schoonmaken
bwesterb snijden, koken afwassen, schoonmaken, snackdealen Minnozz fotograferen, snijden schoonmaken, afwassen
Quis snijden, koken, snackdealen schoonmaken Nova pendelen, koken, snijden snackdealen, fotograferen, schoonmaken
Minnozz snijden, koken schoonmaken, snackdealen, afwassen PaxSum snijden, koken, afwassen fotograferen, snackdealen
Margot snijden, koken, afwassen schoonmaken, snackdealen, fotograferen petervdv snackdealen, pendelen -
lynn fotograferen Quis snackdealen, koken, snijden fotograferen, schoonmaken
Colin Afwassen, schoonmaken, snackdealen koken, snijden Rian snijden, afwassen snackdealen, fotograferen, pendelen
Sjors Pendelen, schoonmaken, snackdealen koken, snijden Roflincopter schoonmaken, afwassen koken
Blondie fotograferen, afwassen, snackdealen schoonmaken, snijden Sjors pendelen, snackdealen koken, afwassen
Roflincopter schoonmaken, snijden, afwassen snackdealen, fotograferen SyntaxTerror snijden, schoonmaken, afwassen snackdealen, pendelen
BOBMarlie fotograferen, koken, snijden afwassen, schoonmaken, snackdealen Tanja snijden, koken, afwassen, schoonmaken fotograferen, pendelen
Aaron fotograferen, afwassen, snijden koken, schoonmaken, snackdealen, pendelen Thom koken, afwassen, pendelen fotograferen, snackdealen
Wassasin koken, snijden, snackdealen fotograferen Wassasin snackdealen, koken, snijden afwassen, schoonmaken, fotograferen
carrot pendelen, schoonmaken, koken fotograferen, snackdealen Weasel fotograferen, snijden schoonmaken, snackdealen
M-ou-se snijden, snackdealen afwassen, schoonmaken, fotograferen Yorick koken, snijden, afwassen snackdealen, fotograferen