This study presents optimization of an industrial Temperature Swing Adsorption (TSA) process for removing ultra-dilute CO2 2 from an ethane stream in an Ethane Treatment Unit (ETU). A TSA cycle, incorporating time- and event driven steps, was developed and optimized using the non-dominated sorting genetic algorithm II (NSGAII). An event-driven constraint was added to the TSA simulator to ensure the ethane product meets the standard quality for ethylene feedstock. This constraint ensures that the CO2 2 content of the product remains below 40 ppm throughout the adsorption step. Additionally, to prevent reduced productivity, the cooling step duration was defined as a function of the heating step duration, ensuring that the overall rest time is about 5 % of the total cycle time. Analysis of Pareto solutions revealed a trade-off between specific energy consumption (SEC) and hydrocarbon recovery, which is critical for industrial applications. Based on the needs of the industry, an optimal region was identified that maximizes ethane productivity and hydrocarbon recovery while minimizing SEC. The proposed optimal design achieved substantial improvements, including a 14.1 % increase in hydrocarbon recovery, an 111.9 % increase in ethane productivity, and a 52.3 % reduction in SEC, with CO2 2 impurity reduced by 30.3 %.