In modern power systems, the uncertain behavior of renewable energy sources (RESs) may result in deviations from the optimal operating dispatches for the various power sources. The electric power generation from Combined Heat and Power (CHP) units is characterized by high efficiency with less pollution. To use CHP units more efficiently, the dynamic economic dispatch problem is applied to obtain the optimal power and heat sources’ outputs to satisfy heat and power demands while meeting the different operational constraints. In this paper, data-driven stochastic optimization is used to model these uncertainties utilizing the Generative Adversarial Networks in scenario generation that are accurate and do not require fitting models or modeling probability distributions. Then, the Fast Forward Selection technique is used to decrease the number of scenarios to improve system tractability. The results obtained indicate that the variability in electrical load, photovoltaic (PV), and wind turbine (WT) output significantly impacts the overall operational costs of the power system. Therefore, it is essential to incorporate the uncertainties associated with electrical load, PV, and WT when aiming for accurate results in economic dispatch. the study found that the overall operation cost of the dynamic economic dispatch of the electrical system for 24 hours after integrating RES achieved a daily savings of 2.5 % in the first scenario. Furthermore, the findings demonstrate that RESs positively contribute to reducing the total operational costs of the power system. The economic dispatch of CHP systems is influenced by the integration of RESs and the uncertainties associated with electrical parameters.