Kindly help me out.

# Rewrite using a for loop

@constraint(model, X^2 + y^2 - d[1]-2X-2y <= -2)

@constraint(model, X^2 + y^2 - d[2]-2X-8y <= -17)

@constraint(model, X^2 + y^2 - d[3]-8X-8y <= -32)

Kindly help me out.

@constraint(model, X^2 + y^2 - d[1]-2X-2y <= -2)

@constraint(model, X^2 + y^2 - d[2]-2X-8y <= -17)

@constraint(model, X^2 + y^2 - d[3]-8X-8y <= -32)

does this not work ?

```
xs = [2, 2, 8]
ys = [2, 8, 8]
ms = [-2, -17, -32]
for k in 1:3
@constraint(model, X^2 + y^2 - d[k]-xs[k]*X-ys[k]*y <= ms[k])
end
```

1 Like

Thank you very much.

The problem has been solved.