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

View File

@ -1,12 +1,12 @@
#! /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 yaml
import re
import subprocess
from collections import OrderedDict
import glpm
conf = yaml.load(open('config.yaml', 'r'))
conf = yaml.safe_load(open('config.yaml', 'r'))
config = conf['config']
config['ignore'].append('')
tasks = OrderedDict(conf['tasks'])

View File

@ -18,7 +18,6 @@ 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;
@ -49,11 +48,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 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 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 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 @@
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
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