Multicarrier energy systems create new challenges as well as opportunities in future energy systems. One of these challenges is the interaction among multiple energy systems and energy hubs in different energy markets. By the advent of the local thermal energy market in many countries, energy hubs' scheduling becomes more prominent. In this article, a new approach to energy hubs' scheduling is offered, called virtual energy hub (VEH). The proposed concept of the energy hub, which is named as the VEH in this article, is referred to as an architecture based on the energy hub concept beside the proposed self-scheduling approach. The VEH is operated based on the different energy carriers and facilities as well as maximizes its revenue by participating in the various local energy markets. The proposed VEH optimizes its revenue from participating in the electrical and thermal energy markets and by examining both local markets. Participation of a player in the energy markets by using the integrated point of view can be reached to a higher benefit and optimal operation of the facilities in comparison with independent energy systems. In a competitive energy market, a VEH optimizes its self-scheduling problem in order to maximize its benefit considering uncertainties related to renewable resources. To handle the problem under uncertainty, a nonprobabilistic information gap method is implemented in this study. The proposed model enables the VEH to pursue two different strategies concerning uncertainties, namely risk-averse strategy and risk-seeker strategy. For effective participation of the renewable-based VEH plant in the local energy market, a compressed air energy storage unit is used as a solution for the volatility of the wind power generation. Finally, the proposed model is applied to a test case, and the numerical results validate the proposed approach.