# Return maximum of a vector; error if empty def symMax(vs): m = vs[0] for v in vs[1:]: m = If(v > m, v, m) return m obj = symMax([P[i][1] + y[i] for i in range(blocks)])