The integration of the renewable energies (the solar energy and the wind energy) is a current challenge that can improve the functioning of the electricity network. In this work, we aim to contribute to the modelling and the optimization of the energy production. However, in order to minimize the production costs, the quantity of the available green energy in the power system, should be defined, and if needed, combined with the other conventional energy sources. The model is implemented under the GAMS 24.7.1 environment, and was validated by using CPLEX. Good results are obtained, the presented model can easily combine different sources of energy, by scheduling the resources with high performance and flexibility.