In the post-pandemic era, emergency department congestion has become a global issue. When congestion occurs in the emergency department, it directly impacts mortality and morbidity rates among emergency patients. Therefore, the timely provision of critical resources by healthcare institutions has become a primary goal. Faced with the increasing number of emergency patients each year, easing the growing frequency of emergency department congestion is a challenge. One prevalent solution involves admitting emergency patients to inpatient care, especially as hospitalization is a common strategy. In Taiwan's medical centers, there are dedicated units managing inpatient beds. Despite variations in the importance hospitals place on inpatient bed management, it remains a significant revenue source. Therefore, effective inpatient bed management can serve as an avenue for implementing strategies to improve emergency department congestion. Single emergency department indicators are insufficient to meet the diverse management policies and complex requirements of different hospitals. Analyzing emergency department congestion requires identifying appropriate key performance indicators crucial for evaluating a hospital's emergency performance. This study collects data from Taiwan's medical centers and utilizes surveys to assess the situation of emergency department congestion in Taiwan. Additionally, it develops a simulation for optimizing the allocation of inpatient bed resources for emergency patients. The optimization considers different hospitals' inpatient department resource allocation speeds, selecting the optimal bed numbers for specific time periods. This approach provides hospital bed managers with the means to optimize bed planning based on the hospital's needs, thus contributing to the improvement of emergency department congestion.