Text this: Optimal mix of renewable and CHP generations for reduced emissions