In this paper, a village energy system is coupled with the wide-area energy network based on the energy hub concept. The village is modeled as an isolated energy hub while it could interact with the energy sub-networks including the electrical, and natural gas through the market. The energy demand of village is supplied with renewable resources such as photovoltaic (PV) system and other generation such as combined heat and power (CHP) technologies. The CHP unit is modeled by the part-load performance. In addition, the battery energy storage is presented beside the PV system to damp the intermittent generation of PV and to be utilized in the high prices of the market. The optimal operation problem is solved to maximize the profit from the energy hub operator point of view. The optimization problem is solved with the teaching-learning based optimization (TLBO) method. The results show that the proper interaction of the village energy system with the upstream sub-networks is so affordable for the system operator to increase the profit, in a way that the maximum benefit of village energy system is reached to 3.6456$.