A model predictive control approach for the optimization of polygeneration microgrids and demand response strategies