Fixed mistake where parameters were mis-ordered for constraints. Removed `relate' function, as it no longer works with the new graph API.