Patent ID: 8645302

Claim:
A non-transitory computer readable medium having instructions stored thereon that, when executed by a processor, causes the processor to function as a constraint solver for solving a constraint satisfaction problem (CSP) model, wherein the model comprises a least one part-whole hierarchy, the solving comprising: for at least one part of the part-whole hierarchy, assigning variables comprising selected, quantity, and relative quantity; automatically applying at least one part-whole hierarchy constraint to the part when a parent for the part is selected, wherein the constraint is based on the selected variable, quantity variable and relative quantity variable assigned to the part; and solving the model and generating a solution; wherein the selected variable represents whether the part is included in the solution for the CSP, the quantity variable represents a total number of instances of the part in the solution summed across all instances of the parent in the CSP, and the relative quantity variable represents a number of instances of the part per unit quantity of the parent in the CSP; wherein the part is a sub-problem of the solution for the CSP and comprises variables and constraints; wherein an automatically applied part-whole hierarchy constraint comprises a quantity of the part is equal to a quantity of its parent multiplied by its relative quantity variable, and solving the model comprises dynamically generating additional instances of the part to equal the quantity of its parent multiplied by its relative quantity variable.