A detailed optimization model is presented for planning the short-term operation of combined cooling, heat and power (CCHP) energy systems. The purpose is, given the design of a cogeneration system, to determine an operating schedule that minimizes the total operating and maintenance costs minus the revenue due to the electricity sold to the grid, while taking into account time-varying loads, tariffs and ambient conditions. The model considers the simultaneous use of different prime movers (generating electricity and heat), boilers, compression heat pumps and chillers, and absorption chillers to satisfy given electricity, heat and cooling demands. Heat and cooling load can be stored in storage tanks. Units can have one or two operative vari...