Compare commits

..

No commits in common. "master" and "weekendxiii" have entirely different histories.

5 changed files with 101 additions and 100 deletions

3
.gitignore vendored
View File

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

View File

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

View File

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

View File

@ -18,6 +18,7 @@ set D := 1..D_count;
/* aanwezigheid x workload for that day */
param Costs{p in P}, integer, >= 0;
/* Person p likes to solve jobs j */
param L{p in P, j in J} default 0, binary;
@ -48,11 +49,11 @@ 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 */
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 1 task */
s.t. min_load_person{p in P}: sum{j in J, d in D} A[p,j,d] >= 1;
/* A person has at least D-1 tasks */
#s.t. min_load_person{p in P}: sum{j in J, d in D} A[p,j,d] >= min_load[p];
/* 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;*/
s.t. max_load_person_total{p in P}: (sum{d in D, j in J} A[p,j,d] * Wl[j]) <= ML;

View File

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