How to rectify a `v::Vector{Float64}` so that `sum(v) == 0`?

The exception is an equality constraint that is simple enough for you to algebraically solve it and exactly eliminate a variable a priori , giving the solver a lower-dimensional problem to deal with.

I can understand this “elimination”, e.g. @constraint(model, x[1] + x[2] + x[3] == 2) yields x[3] := 2 - x[1] - x[2] so that we get rid of x[3].
But aside from this presolve technique, equality constraints are also simpler. The philosophy of Nonlinear Programming consists in the conversion of a harder problem to a simpler problem.
Usually, we convert an inequality constrained problem to an equality constrained problem, then via Lagrangian multipliers, to an unconstrained optimization problem, finally solving a system of linear equations involving both primal decisions and Lagrangian multipliers.



From the Book “Nonlinear Programming”.

Gurobi’s algorithm for solving (large-scale) Linear Programming is also the barrier method, which falls into the category of Nonlinear Programming optimization algorithms.

But yes, from practical experience, equality constraints appear to be more adverse for Gurobi.

As for Ipopt, there seems to be (I assume) an additional judgement for inequality constraint, compared to the more straightforward equality constraints. Getting duals for nonlinear programming problem - #7 by WalterMadelim