Storage equipment, such as batteries and thermal energy storage (TES), has become increasingly important recently for peak-load shifting in energy systems. Mathematical programming methods, used frequently in previous studies to optimize operating schedules, can always be used to derive a theoretically optimal solution, but are computationally time consuming. Consequently, we use metaheuristics, such as genetic algorithms (GAs), particle swarm optimization (PSO), and cuckoo search (CS), to optimize operating schedules of energy systems that include a battery, TES, and an air-source heat pump. In this paper, we used a GA, differential evolution (DE), our own proposed mutation-PSO (m-PSO), CS, and the self-adaptive learning bat algorithm (SLBA), of which m-PSO was the fastest, and CS was the most accurate. CS obtained the semi-optimal solution 135 times as fast as dynamic programming (DP), a mathematical programming method with 0.22% tolerance. Thus, we showed that metaheuristics, especially m-PSO and CS, have advantages over DP for optimization of the operating schedules of energy systems that include a battery and TES.