Text this: Optimization model for energy planning with CO2 emission considerations