buildConstraints function

Build a constraint system