Created
May 21, 2015 18:31
-
-
Save daynebatten/f620a0a66a385dde993c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* These decisions variables govern whether we suppress 0 or 2+ cells within each grouping constraint */ | |
| var choose_zero {con_set} binary; | |
| /* For each grouping constraint, we must have 0 cells suppressed if we're choosing to have 0 cells suppressed */ | |
| con zero_con {i in con_set}: (sum{j in dec_set} choices[j] * constraints[i, j]) - (1 - choose_zero[i]) * 100000000000 <= 0; | |
| /* For each grouping constraint, we must have 2+ cells suppressed if we're choosing to have 2+ cells supppressed */ | |
| con two_more_con {i in con_set}: (sum{j in dec_set} choices[j] * constraints[i, j]) + choose_zero[i] * 100000000000 >= 2; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment