sukrutrao / Timetabler

A customizable timetabling software for educational institutions that encodes timetabling constraints as a SAT formula and solves them using a MaxSAT solver
https://timetabler.readthedocs.io
MIT License
38 stars 9 forks source link

Fix output: ensure high level constraint vars are true when constraint disabled #33

Closed sukrutrao closed 6 years ago

sukrutrao commented 6 years ago

Even if a constraint was disabled, the clauses for that constraint were being added to the formula, while the high level variable corresponding to the set of clauses was not being added.

The high level variable's value was hence free, which could sometimes lead to an incorrect output message that a constraint, that was disabled, could not be satisfied.

This PR fixes this by