## 3 Determining Collision Time Instants in Package Rocking Process  
If a freestanding package rocks under the excitation of vehicle acceleration, overturning occurs when the rocking angle exceeds slenderness angle \(\alpha\). This can lead to catastrophic accidents, making the analysis of rocking response and overturning risks essential. The freestanding package may rock around pivot point 1 or 2, and the governing equation of its rocking motion is:  
\[\ddot{\theta}(t)=-p^{2}(\sin(\alpha\text{sgn}(\theta(t))-\theta(t))+\ddot{u}_ {g}(t)\cos(\alpha) \tag{22}\]  
If the package rocks around point 2, \(\text{sgn}(\cdot)=1\); if it rocks around point 1, \(\text{sgn}(\cdot)=-1\). The frequency of the package's rocking motion is denoted by \(p\), where \(p=\sqrt{mgR/I_{O}}\). Here, \(I_{O}\) represents the moment of inertia about point 1 or 2, given by \(I_{O}=(4/3)\;mR^{2}\). During the rocking process, a collision between the package and the vehicle occurs when \(\theta(t)=0\). In this case, the Newtonian contact law is applied to characterize the velocity jump of the package:  
\[\dot{\theta}(t_{f}^{+})=\dot{\epsilon}\dot{\theta}(t_{f}^{-}) \tag{23}\]  
Here, \(t_{f}\) denotes the collision time instant, where the superscripts \(+\) and \(-\) represent the states immediately after and before the collision, respectively. The restitution coefficient can be determined based on the conservation of angular momentum:  
\[\varepsilon=1-\frac{3}{2}\sin^{2}\alpha \tag{24}\]  
The rocking response of the package can be determined by analyzing Equations (22) and (23). Since the rocking motion of the package is piecewise smooth and involves impacts, obtaining a closed-form solution to Equation (22) is challenging. For slender rocking blocks (where \(\alpha<15^{\circ}\)), the governing equation of the rocking motion can be linearized, allowing the rocking response to be approximated analytically. This approach is applicable in scenarios involving slender rocking blocks, such as bridge piers or slender states. For non-slender blocks, [PERSON] et al. [PERSON] et al. (2018) proposed a Dirac-delta force model to simplify the analysis of the governing differential equation. In [PERSON] et al. (2019), the rocking response of the block was analyzed using an equivalent single-degree-of-freedom oscillator model. Additionally, in [PERSON] et al. (2019); [PERSON] et al. (2020), the authors introduced an approximate method for solving nonlinear rocking motion. However, the formulation of the approximate solution is complex, making its application to the analysis of package rocking and overturning impractical. The efficiency of analyzing the rocking motion of non-slender packages largely depends on the accurate determination of collision time instants \(t_{f}\). Once \(t_{f}\) is identified, the rocking motion between collision instants becomes smooth and can be efficiently analyzed using numerical methods. In this study, we employ a time transformation method combined with the Runge-Kutta method to propose a novel approach for determining the collision time instants \(t_{f}\). This significantly improves the efficiency of analyzing the rocking response of the package. As illustrated in Figure 1, the package may rock around either point 1 or point 2. Based on Equations (22) and (23), the rocking motion of the package can be modeled as a discontinuous system with state jumps. By defining the rocking state vector \(x=\left[\theta,\dot{\theta},t\right]^{\mathrm{T}}\) and the function \(f\), the system dynamics can be described as follows:  
\[f= \begin{bmatrix}\dot{\theta}\\ -p^{2}\big{(}\sin(\alpha\mathrm{sgn}(\theta(t))-\theta(t))+\ddot{u}_{g}(t) \cos(\alpha)\\ 1\end{bmatrix}  \tag{25}\]  
The governing equation of the package rocking motion can be rewritten as:  
\[\frac{d\mathbf{x}(t)}{dt}=f(\mathbf{x}(t))= \begin{cases}f^{\mathbf{x}}(\mathbf{x}(t)),&\psi( \mathbf{x})<0\\ f^{\beta}(\mathbf{x}(t)),&\psi(\mathbf{x})>0\end{cases}