Study and Implementation of a Cogeneration Power Plant in a Portuguese Factory