frizensami / nus-timetable-optimizer

Codebase for the NUS Timetable Optimizer, a tool to help students at the National University of Singapore optimize their timetables to their liking.
https://nus-optimizer.com
MIT License
19 stars 4 forks source link

Can we change our long list of single asserts + "possible values for variables" into something more compact? #23

Open frizensami opened 3 years ago

frizensami commented 3 years ago

Instead of individually asserting SL0 = 0 <=> h0 = 0 SL0 = 0 <=> h1 = 0, ...

can we do: SL = 0 <=> (h0 = 0 AND h1 = 0 AND...) SL != 0 <=> (h0 != 0 AND h1 != 0 AND ...) .....

This will assert that if we don't choose the selector as 0, we need EVERYTHING to not be equal to 0 As long as we have the list of possible assignments for each variable and restrict those selections, maybe this is ok?