Consistency in networks of relations