How to formulate the following constraint using gurobipy
$$ \sqrt{x^2 + y^2} \le z$$
where $x, y, z$ are continuous optimization variables?
I saw how to formulate it using CVXPY:
cp.norm(cp.hstack([x, y])) <= z
I am now wondering how to formulate it in gurobipy. I did not find any information on how to formulate the norm convex function in the gurobipy documentation.
If take the square of both sides,
$$ x^2 + y^2 \le z^2 $$
gurobipy solves it but doesn't this constraint violate DCP rules? I thought the constraint will be following the DCP rules if convex $\leq$ constant, convex $\leq$ concave, but here it is convex $\leq$ convex.