A Method of Optimization with Power System Nonlinear Properties