Due to the increment of energy demand, the current requirement for optimum design of a trigeneration system has become more imperative than ever. The present work deals with the simulation of the demand energy and optimization of a trigeneration system for a hotel building in Mashhad using GAMS software where four objective functions including energy, exergy, environment, and economy have been considered. The results indicate that the improvement of the objective functions was 30.88%, 30.90%, 30.76%, and 17.19%, respectively, compared to the traditional system. Lastly, advanced exergy analysis was performed on the trigeneration system to determine the amount and location of endogenous, exogenous, avoidable, and unavoidable irreversibility rates. The results elucidate that the gas engine has the highest potential in the efficiency improvement, followed by heat exchangers set, electrical chiller, absorption chiller, and gas boiler.