A computer program product for determining optimal settings for controllable taps of voltage regulating transformers in a distribution network, comprising: a computer readable medium having computer readable code embedded therein, the computer readable medium comprising: program instructions that initially generate a control setting including initial control variables u, the control variables u being tap changer controls of the voltage regulating transformers; program instructions that receive a distribution network model and solve a non-linear unbalanced load flow to determine a set of state variables x using the initial control variables u, the state variables x being phase specific voltages at nodes of the distribution network; program instructions (110, 146) that calculate a value of an objective function of the distribution network under the initial control variables u or under a trial solution for u; program instructions that calculate a first order approximation of current and voltage quantities within the distribution network model by using a Jacobian matrix; program instructions that construct a sequence of quadratic programs, QP, based on the first order approximation to generate the trial solution for u; program instructions that discretize the trial solution for u when the trial solution for u is non-integer and that perform systematic adjustment to identify the trial solution for u that produces an actual performance improvement in a full non-linear unbalanced load flow simulation, wherein during the systematic adjustment the full non-linear unbalanced load flow on the trial solution for u is performed to determine the actual improvement in the value of the objective function before accepting the trial solution for u; program instructions that iteratively update the control setting, including the accepted trial solution for u, that minimizes the objective function; and program instructions that output said control setting to a distribution control system. program instructions that initially generate a control setting including initial control variables u, the control variables u being tap changer controls of the voltage regulating transformers; program instructions that receive a distribution network model and solve a non-linear unbalanced load flow to determine a set of state variables x using the initial control variables u, the state variables x being phase specific voltages at nodes of the distribution network; program instructions (110, 146) that calculate a value of an objective function of the distribution network under the initial control variables u or under a trial solution for u; program instructions that calculate a first order approximation of current and voltage quantities within the distribution network model by using a Jacobian matrix; program instructions that construct a sequence of quadratic programs, QP, based on the first order approximation to generate the trial solution for u; program instructions that discretize the trial solution for u when the trial solution for u is non-integer and that perform systematic adjustment to identify the trial solution for u that produces an actual performance improvement in a full non-linear unbalanced load flow simulation, wherein during the systematic adjustment the full non-linear unbalanced load flow on the trial solution for u is performed to determine the actual improvement in the value of the objective function before accepting the trial solution for u; program instructions that iteratively update the control setting, including the accepted trial solution for u, that minimizes the objective function; and program instructions that output said control setting to a distribution control system.