combineConstraints function

Combine constraints