This paper presents a residential hybrid thermal/electrical grid-connected home energy system (HES), including a fuel-cell with combined heat and power and a battery-based energy storage system. The minimum operation cost of this integrated energy system is achieved by proper scheduling of different energy resources, found by applying a new powerful optimization algorithm, the Hyper-Spherical Search (HSS) algorithm, to the system's scheduling problem. This is the first time that HSS is used to face the energy resource dispatch problem. The HSS has been only tested in mathematical problems in the previous study. The optimization procedure generates an efficient look-up table in which the powers generated by different energy resources are determined for all time intervals. The effect of different electricity tariffs for purchasing electricity from the main grid on the operation costs of the system is investigated. Moreover, a battery is properly dispatched in the energy system to decrease the operation costs. A real load demand is used in the simulation. The results of HSS are compared with the harmony search algorithm and the colonial competitive algorithm to show the power and effectiveness of HSS to find the optimal dispatch strategy of energy resources for the first time. This is the first time that HSS is compared with CCA. The results of this paper are expected to contribute to home energy systems and real projects. fuel cell startup cost ($) fuel cell shut down cost ($) maximum limit of fuel cell generated power (kW) minimum limit of fuel cell generated power (kW) upper limit of ramp rate of fuel cell (kW) lower limit of ramp rate of fuel cell (kW) length of time interval (h) initial available energy in battery (kWh) available energy in battery (kWh) charging efficiency of battery discharging efficiency of battery maximum level of stored energy in battery (kWh) minimum level of stored energy in battery (kWh) maximum electricity purchasing cost ($/kWh) cost of purchasing natural gas per kWh ($/kWh) operation costs of battery per kWh ($/kWh) cost of generated power by fuel cell ($/day) cost of electricity purchased from utility ($/day) cost of operation of battery ($/day) cost of purchasing gas ($/day) cost of electricity purchased from utility in the peak period ($/kWh) cost of electricity purchased from utility in the off-peak period ($/kWh) maximum discharging rate of the battery (kW) maximum charging rate of the battery (kW) heat power produced by fuel cell (kW) electrical power produced by fuel cell (kW) fuel cell efficiency heat power directly produced from gas (kW) normalized price of electricity tariff electricity power provided by utility (kW) generated/absorbed power by battery (kW) electrical demand (kW) thermal demand (kW) part load ratio heat to electrical power ratio of fuel cell number of the interval that appears as variables subscript and indicates value of that variable in the i-th interval. 
Application of Hyper-Spherical Search algorithm for optimal energy resources dispatch in residential microgrids