A Model for Thermo-Economic Analysis and Optimization of Steam Power Plants for Power and Cogeneration