Finally got time to read the article and got the sense of deja vu, but later remembered that it is your report from kotlinconf.
We actually have this specific problem (in practice, not as a toy example) at general physic department at MIPT, but we have much more complicated set of constrains (each lecturer has his own preference about days, grouping of lectures and sometimes specific student groups). In our case we do not need perfect solution and most of constraints a "soft" rather than "hard" meaning that some preferences could be ignored. So I was thinking about some kind of bayesian solution.
Sadly, I have my hands full with new laboratory and all this math library stuff, so I don't know where will I have time for that.