In recent years, increasing consumption and energy costs, obligated energy engineers to use energy more efficiently in order to save money and energy. Due to the high amount of waste energy and consequently low efficiency of single-cycle power generation cycles, the use of this waste energy in units has been considered. Particularly use of combined cooling, heating and power generation, (CCHP) systems is a suitable method for the use of waste heat which is dramatically developed in recent years. In these units, the waste heat is used to generate heating and cooling. The main purpose of this research is to design an optimal solar thermal, cooling, and solar power generation system for Qom’s University library building. As a result of the importance of exergy, Exergoenvironment and Exergoeconomic analyzes in evaluating and designing optimal power and cooling cycles, these tools have been used to analyze and optimize the desired cycle. The thermodynamic cycle simulated using ThermoFlex software and result of power generation, heating and cooling unit verified using this software. TRNSYS software is also used to simulate the solar simulation part.Thermodynamic, energy, exergy, Exergoeconomic and Exergoenvironment analysis simulated in MATLAB software environment. The result of multi-objective optimization presented. Optimization performed using the mathematical software's Genetic Algorithm tool with three objective exergy efficiency objectives, total exergy cost, and environmental impact. Furthermore, different decision variables are considered for this optimization in two modes of cooling and heating. The results showed that the three objective parameters were improved in cooling mode compared to base system 3, 15 and 10%, respectively, and in heating mode, 11, 12 and 32%, respectively. Keywords: Combined cooling heating and power generation unit, exergy anlysis, Exergoeconomic, Exergoenvironment, optimazation, generic algorithm