Thermal modeling and optimal design of combined cooling, heating, and power generation system are presented in this article. Selecting the type and number of prime movers, their nominal power and operational strategy, the heating capacity of backup boiler and storage tank, the cooling capacity of electrical and absorption chillers as well as electric cooling ratio (the ratio of electrical chiller capacity to the demand cooling capacity) were considered as nine design parameters. Three types of prime movers including gas turbine, diesel engine, and gas engine were studied in this article. Multi-objective particle swarm optimization algorithm was applied to obtain the maximum actual annual benefit and exergy efficiency simultaneously. Actual annual benefit included the energy, economy, and environmental parameters, therefore with adding exergy parameters, 4 E analysis of combined cooling, heating, and power system was performed. The combined cooling, heating, and power system could run in two operation modes, named economical and electricity tracking modes. In the former case, it was allowed to sell the excess electricity to the network and in the latter, it was not allowed to sell the excess electricity to the grid. It was observed that actual annual benefit for the gas engine was higher than two other cases in economical mode. In electricity tracking mode, the gas engine and gas turbine were more profitable. In addition, the trends of optimum values of design parameters versus actual annual benefit and exergy efficiency in economical mode were investigated and the results were presented. Finally, the results of applying the assumptions of constant and variable running load of prime movers during a year were compared.