def set_objective(self, expression):
if isinstance(expression, numbers.Number):<EOL><INDENT>expression = Expression()<EOL><DEDENT>self._p.set_linear_objective(<EOL>(lp_name, expression.value(var))<EOL>for var, lp_name in iteritems(self._variables))<EOL>
Set linear objective of problem