Adds the part of solving the constraints