## 3 Optimization Model
### Determining Emergency Weights  
The allocation of emergency resources needs to calculate the weighting of people trapped, the level of hazardous material leakage, and the priority of repairing the railway section according to the initial situation of the disaster area, and allocate various rescue materials to the incident point for rescue according to the percentage of various weights. Rescue teams carry different types and quantities of materials for different rescue targets. (1) Rescue of trapped persons  
Based on the number of people trapped at each incident site at the time of the disaster, we determine the number of rescue teams that need to be dispatched to each incident site. \[w_{n}(P)=\left\lceil\left(\frac{I_{n}(P)}{p}\right)\right\rceil \tag{4}\]  
where \(w_{n}(P)\) indicates the number of rescue teams required at the incident point \(I_{n},\lceil\left(\frac{I_{n}}{p}\right)\rceil\) denotes the upward rounding of the number of trapped personnel, \(I_{n}(P)\) is the number of trapped persons at the incident point \(I_{n}\), and \(p\) denotes the expected number of trapped persons per rescue team. (2) Disposal rescue for coal-to-oil and other hazardous chemical leaks  
According to the area of hazardous chemical leaks at the rescue point and the nature of the hazardous chemical itself, the hazard class is divided. Based on the Regulations on Safe Management of Hazardous Chemicals (revised in 2011), the United Nations Globally Harmonized System of Classification and Labeling of Chemicals (GHS), and the Interim Provisions on the Management of Railway Transportation of Dangerous Goods, we here refer to the volatile characteristics of hazardous chemicals and the volatile hazard zoning table to determine the hazard class of flammable liquids (such as coal-to-oil, lubricating oil, and other dangerous chemicals), and quantify the emergency weights \(w_{n}(C)\) as shown in the following equation. \[w_{n}(C)=\left\{ \begin{array}{c}0,\text{\emph{if} not leaked}\\ 1,\text{\emph{if}}s(C)<10\text{\emph{m}}^{2}\text{and not volatile}\\ 2,\text{\emph{if}}10\text{\emph{m}}^{2}\leq s(C)\leq 30\text{\emph{m}}^{2} \text{and not volatile}\\ \text{\emph{or}}s(C)\leq 10\text{\emph{m}}^{2}\text{and volatile}\\ 3,\text{\emph{else}}\end{array} \right. \tag{5}\]  
where \(w_{n}(C)\) indicates the rescue team needed to deal with the hazardous chemical spill at the incident point \(I_{n}\). (3) Damage repair of railway transport lines  
Hazardous chemical railway transportation accidents have the characteristics of a wide range and a large range of derivative accidents. In the emergency disposal process, the leaked hazardous chemicals should be disposed of in a timely manner, the emergency supplies should be assembled and deployed to the incident point, and the line should be unblocked to ensure the normal operation of the line and avoid secondary disasters. According to the zone importance and zone density of the incident point, the zone importance of transporting hazardous chemicals is more important than the zone density, and at the same time, in order to avoid the situation of not assigning rescue teams to an incident point where the priority of a zone is too low, the formula for calculating zone priority is given as follows.