def _add_constraints(self, relation):
expression = relation.expression<EOL>names = []<EOL>for value_set in expression.value_sets():<EOL><INDENT>values = ((self._variables[variable], value)<EOL>for variable, value in value_set)<EOL>constr_name = next(self._constr_names)<EOL>sense = self.CONSTR_SENSE_MAP[relation.sense]<EOL>self._p.add_linear_constraint(<EOL>sense=sense, values=values, rhs=-expression.offset,<EOL>name=constr_name)<EOL>names.append(constr_name)<EOL><DEDENT>return names<EOL>
Add the given relation as one or more constraints

        Return a list of the names of the constraints added.