Optimization and Forecasting Models for Electricity Market and Renewable Energies