I based the algorithm off the generation of monotone Boolean functions (http://en.wikipedia.org/wiki/Dedekind_number) using the algorithm here: http://www.mathpages.com/home/kmath094.htm. I had to make some tweaks to ensure that already somewhat restricted models were properly dealt with, and that there is a fallback in case the algorithm can't handle the number of factors.
I based the algorithm off the generation of monotone Boolean functions (http://en.wikipedia.org/wiki/Dedekind_number) using the algorithm here: http://www.mathpages.com/home/kmath094.htm. I had to make some tweaks to ensure that already somewhat restricted models were properly dealt with, and that there is a fallback in case the algorithm can't handle the number of factors.