  A new technique is presented for solving the problem of enforcing control
limits in power flow studies. As an added benefit, it greatly increases the
achievable precision at nose points. The method is exemplified for the case of
Mvar limits in generators regulating voltage on both local and remote buses.
Based on the framework of the Holomorphic Embedding Loadflow Method (HELM), it
provides a rigorous solution to this fundamental problem by framing it in terms
of \emph{optimization}. A novel Lagrangian formulation of power-flow, which is
exact for lossless networks, leads to a natural physics-based minimization
criterion that yields the correct solution. For networks with small losses, as
is the case in transmission, the AC power flow problem cannot be framed exactly
in terms of optimization, but the criterion still retains its ability to select
the correct solution. This foundation then provides a way to design a HELM
scheme to solve for the minimizing solution. Although the use of barrier
functions evokes interior point optimization, this method, like HELM, is based
on the analytic continuation of a germ (of a particular branch) of the
algebraic curve representing the solutions of the system. In this case, since
the constraint equations given by limits result in an unavoidable singularity
at $s=1$, direct analytic continuation by means of standard Pad\'e
approximation is fraught with numerical instabilities. This has been overcome
by means of a new analytic continuation procedure, denominated
Pad\'e-Weierstrass, that exploits the covariant nature of the power flow
equations under certain changes of variables. One colateral benefit of this
procedure is that it can also be used when limits are not being enforced, in
order to increase the achievable numerical precision in highly stressed cases.
