Skip to content

Commit

Permalink
ENHANCED: Support multiple free days for teachers, closing #2.
Browse files Browse the repository at this point in the history
Reported by Thure Dührsen. Many thanks!
  • Loading branch information
triska committed Sep 3, 2019
1 parent 1a2bde9 commit c702321
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions simsttab.pl
Original file line number Diff line number Diff line change
Expand Up @@ -152,12 +152,9 @@
include(teacher_req(Teacher), Rs, Sub),
pairs_slots(Sub, Vs),
all_different(Vs),
( teacher_freeday(Teacher,F) ->
maplist(slot_quotient, Vs, Qs),
all_diff_from(Qs, F)
; true
).

findall(F, teacher_freeday(Teacher, F), Fs),
maplist(slot_quotient, Vs, Qs),
maplist(all_diff_from(Qs), Fs).

sameroom_var(Reqs, r(Class,Subject,Lesson), Var) :-
memberchk(req(Class,Subject,_Teacher,_Num)-Slots, Reqs),
Expand Down

0 comments on commit c702321

Please sign in to comment.