Thermal Power Plant Emissions Minimization Taking into Account Losses in Network