The dynamic optimal power flow (DOPF) is a mixed-integer nonlinear programming problem. This paper builds a DOPF model with discrete and continuous variables, and then proposes the iterative method based on the master and sub-problems obtained from the generalized Benders decomposition (GBD). Firstly, the power output of conventional generators and the reactive power of the wind farm are modeled as the continuous decision variables, and the transformer taps ratio is built as a discrete decision variable. Secondly, the objective function is to minimize the total power generation cost and network loss. Thirdly, the DOPF problem is decomposed into the master problem and sub-problems by fixing a complex variable, which reduces the complexity of DOPF. Then, the proposed algorithm is used to solve the master and sub-problems. Finally, simulation results show that the proposed method has advantages in terms of reducing computational time and enhancing accuracy. INDEX TERMS DOPF model, wind power integration, discrete and continuous variables, GBD algorithm.