The usage of Combine Heat and Power (CHP) improves the utilization of primary energy. Due to the fact that CHP's system is typically driven by thermal demand, a CHP operates continuously for many hours of the year, with typical high running time in winter, almost zero in summer, and fluctuates in months between. To fully utilize its potential, as well as decouple electric and thermal production, Thermal Energy Storage (TES) is needed. Using an optimization method based on Mixed-integer Linear Programming (MILP) for the management of heat supply using CHPs, boilers, and TES, a maximum profit is secured.