This paper presents a novel mixed integer linear programming-Newton approach for solving constrained AC power flow problems, based on a recently proposed linear programing-Newton method. The linear programming-Newton method overcomes some deficiencies of the classical Newton's method, while retaining its quadratic convergence in the neighbourhood of a solution. The discrete nature of some control variables, such as transformer tap ratios and bus shunt susceptances, are often ignored in power flow algorithms due to difficulties that they introduce. The violation of operational limits in power flow algorithms is typically corrected in ex-post procedures, such as PV-PQ bus switching, which may lead to infeasibilities. Finally, under some circumstances, power flow problems may not have a solution; in these cases, a desirable property of a power flow algorithm would be the ability to obtain a nearly feasible solution. The approach proposed in this paper handles these difficulties in a unified framework and is able to deal directly with discrete variables and operational limits. When there are no power flow solutions, a nearly feasible solution that minimizes a merit function is obtained. Numerical experiments show that the proposed approach is robust and obtains accurate solutions in the presence of discreteness conditions and operational limits. This is an open access article under the terms of the Creative Commons Attribution License, which permits use, distribution and reproduction in any medium, provided the original work is properly cited.