Model vector Variables x[1:10] obj End Variables Intermediates y[1] = x[1]^2 y[2:10] = y[1:9] + x[2:10]^2 z[1] = x[1] z[2:10] = z[1:9] + x[2:10] End Intermediates Equations y[10] <= 1 obj = -z[10] End Equations End Model