## 1 Introduction  
Earthquakes cause severe damage and economic loss to urban areas, and the resilience of cities has received worldwide attention. An accurate and rapid assessment of seismic damage, economic loss, and post-event repair time can provide an important reference for emergency rescue and post-earthquake recovery. Therefore, it is of great importance to the enhancement of community resilience.  
The experience of several major earthquakes in recent years indicates that the assessment of building damage in an earthquake-stricken area needs to be improved further. After an earthquake, communication in the disaster area is delayed; the disaster site is usually chaotic, and there are not enough professionals to evaluate building safety in a short time. Furthermore, rumors and fake information on the internet may interfere with accurate seismic damage assessment. Therefore, it is necessary to propose a scientific, objective, and timely method for earthquake loss assessment.  
To date, available near-real-time loss estimation tools can be divided into two categories based on the size of the area they cover: (1) Global systems and (2) local systems [1]. Global near-real-time earthquake loss estimation tools primarily include the Prompt Assessment of Global Earthquakes for Response (PAGER) [2], the Global Disaster Alert and Coordination System (GDACS) [3], and the World Agency of Planetary Monitoring and Earthquake Risk Reduction (WAPMERR) [4]. Local systems include the Earthquake Rapid Reporting System in Taiwan; USGS-ShakeCast, Istanbul's earthquake rapid response system; and the Rapid Response and Disaster Management System in Yokohama, Japan [5]. These seismic loss estimation systems are generally comprised of three parts: The ground motion intensity measure (IM), building inventory and fragility, and direct economic losses and casualties. The ground motion IM can be obtained directly from the real-time monitoring data of a seismic network or calculated using ground motion prediction equations (GMPE). The building inventory data can be determined using either a detailed building database or macroscopic statistical data. The seismic damage to buildings can be predicted using the damage probability matrix (DPM) method [6], the capacity spectrum method [7], or artificial intelligence-based methods [8; 9]. Economic losses and casualties are generally calculated using empirical models.  
However, the main problems existing in these systems are as follows: (a) The dynamic characteristics of ground motion are not comprehensively considered; (b) the DPM method is difficult to apply in areas where historical earthquake data are lacking or in quickly developing areas where there are large differences between the inventories of current and historical buildings; (c) the capacity spectrum method cannot easily represent the concentration of damage to different stories or the time-domain properties of ground motions (e.g., the velocity impulse of ground motions); (d) the earthquake loss prediction method relies on historical seismic damage data, and the repair time cannot be provided in these systems.  
Consequently, this work proposes a real-time city-scale time-history analysis method for post-earthquake damage assessment. The actual ground motion records obtained from seismic stations were input into the building models of the earthquake-stricken area, and the nonlinear time-history analysis of these models was subsequently performed. The seismic damage, economic loss, and repair time of the target region subjected to this earthquake were evaluated according to the analysis result. A program, named \"Real-time Earthquake Damage Assessment using City-scale Time-history analysis\" (or \"RED-ACT\" for short), was developed. The application and the advantages of the proposed method were demonstrated through actual earthquake events.