Economic Dispatch (ED) is the problem of scheduling the output power levels of the committed generating units in a power system, over some time horizon to meet the demand (assuming known) at minimum cost. Optimal Control Dynamic Dispatch (OCDD) uses a dynamic model of the power generation based on ramping constraints. In OCDD, the number of committed units in the system is determined in advance by solving the so-called unit commitment (UC) problem. The progress in the mixed-integer programming algorithms has inspired researchers to combine the ED, and UC in one problem, and then solve it as a static problem. In spite of the speed and accuracy, the static optimization solution can not adapt to fast changes in the power systems. In addition, it suffers from the drawback of violating the ramping rates constraints at the beginning of the planning horizon. In this work, we propose a mixed-integer dynamical model for the power generation to solve both ED, and UC by optimal control strategy. We show that the proposed method gives more accurate results than common approaches in literature. The proposed approach is well suited for small or isolated power systems.