The optimal power flow is an important tool for power system planning and power system operation. It is used in a 24-hour period to find an economic dispatch of generating units considering network restrictions. The optimal power flow provides valuable information about the operation cost, the transmission flows, the generation and the congestion in the system. This information is used by generators, planners, operators and regulators in order to analyze and take decisions about the system at short and long term. The first one corresponds to the information for the operation. The second one corresponds to the information for the planning. This paper proposes a detailed optimal power flow formulation looking for a minimum cost of generation considering wind generation. Five solvers (CBC, CLP, CPLEX, Gurobi and GLPK.) have been used in order to compare differences between them. These solvers are commonly used to solve the multiperiod DC optimal power flow. An IEEE-24 test system is used to compare the solutions provided by the solvers. The findings reveal significant differences between the solvers when they are used to solve the IEEE-24 test system. Additionally, the computing time for each solver is reported. The solvers CPLEX and Gurobi show the lowest computational time to find a solution.