A two-stage optimization method for coal storage site selection and route

By combining K-means clustering and RF-SVR model with Dantzig-Wolfe decomposition method in a two-stage optimization approach, the problems of stochastic demand and transportation losses in coal storage site selection and route optimization were solved, achieving efficient collaborative optimization of the coal supply chain and improving economic efficiency and stability.

CN122198256APending Publication Date: 2026-06-12CHANGAN UNIV +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610598041.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-04-30
Publication Date
2026-06-12

AI Technical Summary

Technical Problem

Existing technologies have failed to effectively address stochastic demand and transportation losses in coal storage site selection and route optimization, resulting in insufficient storage capacity or excessive facility investment, reduced resource utilization, and inaccurate reflection of transportation costs and losses.

Method used

The K-means clustering algorithm is used to handle stochastic demand, and an RF-SVR combined prediction model is constructed. By combining the Dantzig-Wolfe decomposition method and the local search algorithm, the two-stage stochastic optimization model can be solved collaboratively, coordinating warehouse location selection and vehicle route decision-making.

Benefits of technology

It has improved the integration of planning and operation of the coal supply chain, enhanced computational efficiency and the economy and stability of decision-making, adapted to the characteristics of demand fluctuations, reduced the number of precise path calculations, and optimized warehouse location and path schemes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122198256A_ABST
    Figure CN122198256A_ABST
Patent Text Reader

Abstract

The application discloses a coal storage site selection and path two-stage optimization method and belongs to the technical field of coal supply chain optimization. S1, a two-stage random optimization model is constructed; S2, K-means is used for scene processing of random demand to form a training sample; S3, an RF-SVR combined prediction model is constructed based on the training sample, and a mapping relationship between key features and vehicle path and cost is established; S4, a branch pricing algorithm based on Dantzig-Wolfe decomposition is used to solve the first-stage site selection and distribution scheme; S5, the site selection and distribution scheme is input into the RF-SVR combined prediction model to obtain a second-stage vehicle path initial solution; S6, based on the initial solution, two-stage collaborative optimization is realized through iterative feedback, and a decision result is output. By using the above method, random demand and transportation loss are considered, two-stage collaborative optimization is realized, cost reduction and benefit increase are effectively realized, and the stability and decision efficiency of the coal supply chain are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of coal supply chain optimization technology, and in particular to a two-stage optimization method for coal storage location and route. Background Technology

[0002] In China, India, and parts of Southeast Asia, coal will continue to play a fundamental role in the energy supply system for a considerable period due to resource endowments and energy consumption structures. Taking China as an example, the northwestern regions, including Shanxi, Shaanxi, and Inner Mongolia, account for 64% of the country's coal reserves, while the Bohai Rim and Yangtze River Delta regions account for over 65% of consumption. This spatial mismatch between coal production and consumption creates a demand for long-distance, large-scale, and cross-regional coal transportation.

[0003] Against this backdrop, the rational layout of coal storage facilities and the efficient organization of vehicle routes are crucial for ensuring a stable coal supply and reducing logistics costs. However, coal demand is influenced by various factors such as seasonal changes, industry fluctuations, market environment, and policy regulation, exhibiting strong randomness and volatility. This makes early decisions regarding warehouse site selection, capacity allocation, and demand distribution quite challenging. Planning based on average demand levels can easily lead to insufficient storage capacity, increased distribution pressure, and service delays during periods of high demand. Conversely, allocating resources based on high demand levels may result in excessively high facility investment, decreased resource utilization, and increased operating costs. Therefore, demand uncertainty directly impacts the rationality of the coal supply chain network structure design and the economic viability of the operational plan.

[0004] On the other hand, in the actual transportation of coal, especially under long-distance, high-volume conditions, coal will suffer certain losses due to loading and unloading, spillage, volatilization, and other factors. These losses vary with the transportation distance, vehicle routes, and vehicle load levels, thus significantly impacting actual transportation costs and distribution plans. However, existing studies on warehouse site selection and route optimization often fail to adequately consider coal transportation losses or simply use fixed proportions for simplification, making it difficult to accurately reflect the true cost structure of the coal logistics system. Summary of the Invention

[0005] The purpose of this invention is to provide a two-stage optimization method for coal storage site selection and route, thereby solving the above-mentioned technical problems.

[0006] To achieve the above objectives, this invention provides a two-stage optimization method for coal storage site selection and route, comprising the following steps: S1. Construct a two-stage stochastic optimization model with the objective of minimizing warehouse construction costs, transportation costs, loss costs, and service timeout penalty costs; S2. Use K-means (K-means clustering algorithm) to process the random demand into scenarios, generate a set of random demand scenarios, solve for the optimal path and its cost in the scenario set, and form training samples. S3. Construct an RF (Random Forest)-SVR (Support Vector Regression) combined prediction model based on training samples to establish the mapping relationship between key features and vehicle routes and their costs. S4. Using a branch pricing algorithm based on Dantzig-Wolfe (Dantzig-Wolfe Decomposition) to solve the first-stage location allocation scheme of the two-stage stochastic optimization model; S5. Input the location allocation scheme into the RF-SVR combined prediction model to predict the initial solution of the second stage vehicle path of the two-stage stochastic optimization model. S6. Based on the initial solution, a local search algorithm is used to solve the second-stage vehicle route scheme. The two-stage collaborative optimization is achieved through iterative feedback, and the decision results are output.

[0007] Therefore, the beneficial effects of the two-stage optimization method for coal storage site selection and route described above are as follows: 1. By constructing a two-stage stochastic programming model that considers stochastic demand and transportation losses, the strategic-level warehouse site selection and the operational-level vehicle route decision-making can be coordinated simultaneously, thereby improving the integration level of coal supply chain planning and operation.

[0008] 2. Using K-means for demand scenario processing can improve the representativeness and robustness of stochastic demand representation and adapt to the fluctuating characteristics of coal demand; by constructing an RF-SVR path and cost combination prediction model, the number of precise path solutions can be reduced while ensuring prediction accuracy, thereby improving the computational efficiency of the overall optimization process; the branch pricing algorithm based on Dantzig-Wolfe decomposition can effectively solve the first-stage stochastic location-allocation problem; and the local search algorithm with a fusion variable neighborhood search mechanism can improve the solution quality and stability of the second-stage vehicle path scheme.

[0009] 3. Through a two-stage bidirectional iterative feedback mechanism, the site selection, allocation, and route coordination are optimized, thereby improving the economy and operational efficiency of the supply chain under uncertain demand. The technical solution of this invention will be further described in detail below with reference to the accompanying drawings and embodiments. Attached Figure Description

[0010] Figure 1This is an overall flowchart of a two-stage optimization method for coal storage site selection and route according to the present invention; Figure 2 A flowchart illustrating how the K-means algorithm generates random demand scenarios and forms training samples according to the present invention; Figure 3 The elbow rule of this invention is combined with the profile coefficient to determine the optimal number of clusters. Detailed Implementation

[0011] To make the objectives, technical solutions, and advantages disclosed in the embodiments of the present invention clearer, the embodiments of the present invention will be further described in detail below with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are only used to explain the embodiments of the present invention and are not intended to limit the embodiments of the present invention. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative effort are within the scope of protection of this application. Examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout.

[0012] It should be noted that the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion, such as a process, method, system, product, or server that includes a series of steps or units, not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such process, method, product, or device.

[0013] The embodiments of the present invention will now be described in detail with reference to the accompanying drawings.

[0014] like Figures 1-3As shown, this invention provides a two-stage optimization method for coal storage location and route, considering stochastic demand and transportation losses, including the following steps: S1, based on the geographical mismatch of coal resource supply and demand, natural losses during transportation, and demand randomness, a two-stage stochastic optimization model for coal storage location and route is constructed; the objective of the two-stage stochastic optimization model is to minimize warehouse construction costs, transportation costs, loss costs, and service timeout penalty costs, wherein the loss cost is calculated based on the segmented load of the vehicle, transportation distance, and unit loss rate; S2, K-means is used to process the stochastic demand into scenarios, generating a set of stochastic demand scenarios, and the optimal route and its cost in the scenario set are solved to form training samples; S3, an RF-S is constructed based on the training samples. The VR combined prediction model uses RF to screen key features and SVR to establish the mapping relationship between key features such as warehouse location scheme, demand allocation scheme, and cost coefficient and vehicle routes and their costs. S4 uses a branch pricing algorithm based on Dantzig-Wolfe decomposition to solve the first-stage location allocation scheme of the two-stage stochastic optimization model. S5 inputs the location allocation scheme into the RF-SVR combined prediction model to predict the initial solution of the second-stage vehicle routes of the two-stage stochastic optimization model. S6, based on the initial solution, a local search algorithm is used to solve the second-stage vehicle route scheme. Through iterative feedback between the two stages, collaborative optimization between the two stages is achieved, outputting decision results including warehouse location, demand allocation scheme, and vehicle route scheme.

[0015] In this embodiment, taking 10 demand points, 3 candidate warehouses, 4 vehicles, and 156 initial demand scenarios as an example, a coal storage location-path network is constructed, consisting of a set of candidate warehouses, a set of demand points, a set of vehicles, and a set of random demand scenarios, to verify the effectiveness of the method of the present invention. The parameter settings of the two-stage stochastic optimization model for coal storage location-path are as follows: chance constraint confidence level Take 0.80; vehicle capacity Set at 1000 tons / vehicle; unit transportation cost and unit loss cost We use 6 yuan / ton·km and 4 yuan / ton·km respectively. Considering regional differences, a time penalty coefficient is applied. The unit loss rate is set at 30, 20, and 15 for the eastern, central, and western regions, respectively. The values ​​were 0.025, 0.03, and 0.04, respectively.

[0016] Specifically, the two-stage stochastic optimization model consists of a first-stage strategic decision and a second-stage retrieval decision. The first stage determines whether candidate warehouses should be activated and the allocation relationship between each demand point and the warehouse. The objective is to minimize the sum of the expected value of warehouse construction cost and the expected value of retrieval cost in the second stage. Chance constraints ensure that the activated warehouses have the ability to meet the allocated demand under a pre-set confidence level. The relevant formulas for the first-stage model are as follows: (1); (2); (3); (4); (5); (6); (7); in, For the candidate repository set; For warehouse Fixed construction costs; For 0-1 variables, build a repository. The value is 1 if it is true, and 0 otherwise. A set of random demand scenarios; For the scene The probability of occurrence; For the scene The second phase will focus on recovering costs. For the set of demand points; For 0-1 variables, the demand point Distribution by warehouse The value is 1 when the service is active, and 0 otherwise. Confidence levels are constrained by capacity opportunity; 0-1 variables, scenario Down to the warehouse The value is 1 when the capacity meets the demand, and 0 otherwise. For the scene Next demand point Demand; For warehouse The capacity; M is a large constant used for constraint relaxation; Formula (1) is the overall objective function of the first stage, which means that the optimization objective is to minimize the sum of the warehouse fixed construction cost and the expected value of the second stage retrieval cost under each demand scenario, so as to achieve the optimal total cost of strategic decision-making; Formula (2) is the unique allocation constraint of demand points, which means that each demand point must be allocated and can only be allocated to one warehouse to provide services, ensuring that demand allocation is without omission or duplication; Formula (3) is the warehouse activation association constraint, which means that only when the warehouse is activated can the warehouse be activated. Only when a warehouse is activated for construction can demand points be allocated to it to receive services, establishing a dependency relationship between site selection and allocation; Formula (4) is a capacity opportunity constraint, indicating that when the warehouse is activated for construction, demand points can be allocated to the warehouse to receive services, thus ... When enabled, the repository will have at least Under a probability level, it has the ability to meet the allocated demand, ensuring service reliability; Formula (5) is the capacity constraint effective condition, indicating that it only takes effect when the warehouse... Only when a warehouse is enabled is its capacity constraint checked; warehouses that are not enabled are not subject to capacity constraint checks. Formula (6) represents the scenario capacity constraint, indicating that in the scenario... If the warehouse is determined Meets capacity requirements, i.e. When the total demand for allocation does not exceed the rated capacity, the constraint is relaxed through the big M; Formula (7) is the range of values ​​for the domain constraint of the decision variables in the first stage. The first stage location selection, allocation, and capacity satisfaction variables are defined as 0-1 binary variables, and the range of values ​​for the variables is clarified. The second stage optimizes vehicle routes for each scenario based on the location selection and allocation results of the first stage. The second-stage model aims to minimize the sum of transportation costs, transportation loss costs, and service timeout penalty costs, while simultaneously satisfying multiple constraints. The relevant formulas for the second-stage model for each scenario are as follows: (8); (9); (10); (11); (12); (13); (14); (15); (16); (17); (18); (19); (20); (twenty one); (twenty two); in, Let be the set of network arcs, and ; It is a set of all nodes, and ; For vehicle assembly; For arc Unit transportation cost; For arc Transportation distance; 0-1 variables, scenario Get off the vehicle After the arc The value is 1 if it is true, and 0 otherwise. For arc Unit coal loss cost coefficient; For arc Average coal loss rate per unit distance; For the scene Get off the vehicle In the arc The load capacity on it; For demand points Penalty cost per unit of timeout; For the scene Get off the vehicle Arrive at the demand point The timeout period; 0-1 variables, scenario Get off the vehicle Distribution Service Warehouse The value is 1 if it is true, and 0 otherwise. For vehicles Rated capacity; For the scene Get off the vehicle Arrive at the demand point Time; For arc Transportation time; For demand points Left boundary of the service time window; For demand points Right boundary of the service time window; For the scene Get off the vehicle Access Demand Points The order, For the scene Get off the vehicle Access Demand Points The order of the two is that both are MTZ (Miller-Tucker-Zemlin) subloop elimination auxiliary variables; Formula (8) is the objective function of the second stage single scenario, which means that the goal is to minimize the sum of transportation cost, transportation loss cost and service timeout penalty cost, and to achieve the optimal delivery route in a single scenario; Formula (9) is the unique service constraint of the demand point, which means that each demand point must be served in any scenario and can only be served by one vehicle once to ensure service integrity; Formula (10) is the single warehouse constraint of the vehicle, which means that each vehicle can be assigned to at most one warehouse. Each warehouse is designated as a separate warehouse, prohibiting vehicles from serving across warehouses to simplify scheduling management; Formula (11) is a vehicle-warehouse service permission constraint, indicating that a vehicle can only be assigned to a warehouse when the warehouse undertakes a service task; Formula (12) is a vehicle service range constraint, indicating that a vehicle can only serve demand points assigned to the corresponding warehouse and cannot serve unassigned demand points; Formula (13) is a vehicle-warehouse matching constraint, indicating that the number of demand points served by a vehicle is consistent with the service relationship of the warehouse to which the vehicle belongs, ensuring clear path affiliation; Formula (14) is a network flow balance constraint, indicating that the number of times a vehicle enters a node is equal to the number of times it leaves, ensuring that... The delivery route is continuous and uninterrupted; Formula (15) is a load recursive balance constraint, which means that the vehicle load gradually decreases as demand is delivered, accurately depicting the load change pattern of each segment during the delivery process; Formula (16) is a vehicle load upper limit constraint, which means that the actual load of the vehicle in any segment does not exceed its rated capacity, ensuring transportation safety; Formula (17) is a time recursive constraint, which means that the arrival time of the vehicle between nodes satisfies the transportation time logic, depicting the time sequence of the route; Formula (18) is a soft time window service constraint, which means that the arrival time of the vehicle should fall within the time window of the demand point as much as possible, and the excess part is included in the penalty cost; Formula ( Formula (19) is the MTZ sub-loop elimination constraint 1, used to prohibit vehicles from forming closed sub-loops between demand points without passing through the warehouse, ensuring the legality of the route; Formula (20) is the MTZ sub-loop elimination constraint 2, defining the range of values ​​for the auxiliary variable of node access order, and working with Formula (19) to achieve sub-loop elimination; Formula (21) is the second-stage 0-1 variable domain constraint, defining vehicle route and vehicle ownership variables as binary variables, clarifying the legal values ​​of the variables; Formula (22) is the second-stage continuous variable domain constraint, defining continuous variables such as load, arrival time, and overtime time as non-negative, ensuring the reasonableness of the physical meaning.

[0017] In S2, S21, a basic demand database is constructed based on coal consumption data from 2012 to 2024, including monthly observations for 13 years and 12 months. The structural characteristics of coal demand are mined, and an initial set of random demand scenarios is generated based on the historical demand distribution at different demand points. S22, using indicators such as total demand and extreme single-point demand as clustering features, the initial set of random demand scenarios is screened using K-means, and the optimal number of clusters is determined to be 4 by combining the elbow rule and silhouette coefficient. S23, in each cluster, samples that are closer to the cluster center and have larger weights are selected as representative scenarios of that cluster, thus forming a set of representative scenarios. The weight of each representative scenario is taken as the proportion of the number of samples in its cluster to the total number of samples, and the sum of the weights of all representative scenarios is 1. Furthermore, based on 3 candidate warehouses, 7 warehouse combinations were constructed, 6 demand allocation schemes were designed for each warehouse combination, and 168 samples were generated in combination with 4 representative demand scenarios. The corresponding path problems were solved accurately, and 4 abnormal samples were removed by using the 3σ principle to obtain 164 valid samples. After Z-score standardization, the samples were divided into training set and validation set in an 8:2 ratio.

[0018] In S3: S31, outlier cleaning, standardization, and training / validation set partitioning of the sample data generated from the scenario are performed on the sample data to form model training data; S32, using scenario features, warehouse location features, demand allocation features, and their combinations as input, and the corresponding route and cost as output labels, the RF model is first trained using the training set as input. The importance of features is ranked by calculating the reduction in the mean squared error of each feature in the route cost prediction results, and key features with high cumulative importance are selected, including 13 core features: candidate warehouse construction cost, candidate warehouse capacity, coal demand at the demand point, left time window, right time window, unit time penalty cost, transportation loss rate of the area where the demand point is located, chance constraint confidence level, transportation distance from the warehouse to the demand point, transportation time, unit transportation cost, vehicle capacity limit, and unit coal loss cost; then, the SVR model is trained based on the selected key features, and parameter optimization is performed using 8-fold cross-validation combined with grid search. Finally, the error penalty parameter is set to 50, the kernel function parameter to 0.01, and the insensitive loss parameter to 0.5. The kernel function is a radial basis function, and cross-validation is performed. =0.89 and no obvious overfitting, thus the RF-SVR combined prediction model was constructed. This model can accurately characterize the nonlinear mapping relationship between key features and path costs. It can not only realize the rapid prediction of path costs to support the subsequent local search algorithm, but also extract local structural information from the solved high-quality paths, providing inspiration for the second-stage local search algorithm.

[0019] In S4: S41, reconstruct the first-stage model according to the candidate warehouse service mode. Define the warehouse activation status, service demand point set, and capacity satisfaction status combination of each scenario as a service mode. Select 3 candidate warehouses, denoted as Warehouse 11, Warehouse 12, and Warehouse 13. The fixed construction cost and rated capacity of each candidate warehouse are set according to the example data; S42, for any candidate service warehouse... ,make For its set of feasible service models, and , Used to characterize the repository's activation status, service demand set, and scenario capacity fulfillment status, a total of 12 basic service modes are generated in the initial stage. any mode in The feasibility probability of this scenario is: (twenty three); in, For warehouse Adopting the pattern The probability of scenario feasibility. For pattern In the scene The 0-1 parameters determine whether the capacity constraint is satisfied; the overall cost is: (twenty four); in, For warehouse Adopting the pattern The overall cost For warehouse Adopting the pattern In the scene The path cost below; S43. Construct a constrained master problem using service patterns as an example. The relevant formulas are as follows: (25); (26); (27); (28); (29); in, In the pattern Next demand point Is it from the warehouse? The 0-1 parameters of the service, when the demand point From warehouse The value is 1 when the service is active, and 0 otherwise. Select variables for the pattern when selecting a repository. pattern The value is 1 if the condition is met, and 0 otherwise; Formula (25) is the objective function that restricts the main problem; Formulas (26)-(27) are the constraint functions that restrict the main problem. S44. The predicted path cost is obtained by using the RF-SVR combined prediction model. The approximate comprehensive cost of the model is: (30); in, For warehouse Adopting the pattern In the scene The predicted path cost is as follows; S45, based on linear relaxation of the restricted master problem, dual variables are introduced, and the reduced cost of the model is: (31); in, , , To constrain the dual variables corresponding to the constraints of the main problem, a pricing subproblem search negative reduction cost service model is constructed, with the objective function as follows: (32); (33); (34); in, For demand points Assign to warehouse 0-1 variables are assigned to the warehouse. The value is 1 if it is true, and 0 otherwise. For the allocation mode in the scene The following variables are 0-1, indicating whether the capacity constraint is satisfied. The variable is 1 if the capacity constraint is satisfied and 0 otherwise. S46. When the pricing subproblem generates a negative cost column, the corresponding service mode is added to the constrained master problem for further iterative solution. When there is no negative cost column, the optimal linear relaxation solution of the current constrained master problem is obtained. If the current solution is a fractional solution, the column generation process is repeated for the child nodes under the branch and bound framework. Furthermore, the feasible service mode set is initialized during the first stage of solution. After several rounds of column generation iterations, the optimal linear relaxation solution of the constrained master problem is obtained. Then, the fractional solution is processed through the branch and bound framework to obtain the initial integer scheme. This scheme enables warehouses 11 and 13, assigns the demand points {1,2,5,8,9} to warehouse 13, and assigns the demand points {3,4,6,7,10} to warehouse 11. The warehouse capacity satisfaction rate reaches more than 90% in each scenario. Finally, an integer feasible solution that satisfies the capacity constraint and the opportunity constraint is obtained.

[0020] In S5: S51, extract the warehouse location results and demand allocation scheme obtained from the first stage solution. Based on the relevant information of each warehouse and the demand points it serves, construct a vehicle route prediction input feature vector containing warehouse, demand, transportation, and loss characteristics. The feature vector covers information such as demand volume at the demand point, time window range, transportation distance and time from the warehouse to the demand point, unit transportation cost, regional transportation loss rate, vehicle capacity constraints, and unit coal loss cost; S52, input the input feature vector into the RF-SVR combined prediction model to complete the prediction of vehicle routes and their costs. Specifically, warehouse 11 serves demand points {3,4,6,7,10}, and warehouse 13 serves demand points {1,2,5,8,9}. Input the corresponding feature vectors into the trained RF-SVR combined prediction model to complete the prediction of vehicle routes and their costs. Based on the prediction results, determine the demand point access order and form an initial vehicle route scheme; S53, determine the demand point access order based on the prediction results and form an initial vehicle route scheme, taking scenario 1 as an example: Vehicle 1 route: Warehouse 13 → Demand Point 1 → Demand Point 5 → Warehouse 13; Vehicle 2 route: Warehouse 13 → Demand Point 2 → Demand Point 9 → Demand Point 8 → Warehouse 13; Vehicle 3 route: Warehouse 11 → Demand Point 10 → Demand Point 6 → Demand Point 7 → Warehouse 11; Vehicle 4 route: Warehouse 11 → Demand Point 3 → Demand Point 4 → Warehouse 11; and these routes are used as the initial solutions for the second-stage vehicle route optimization model. The initial vehicle route schemes are input into S6 as the initial solutions for the second-stage vehicle route optimization model to improve the efficiency and quality of subsequent route optimization solutions.

[0021] In S6: Based on the warehouse location and demand allocation scheme in S4 and the route information predicted in S5, a local search algorithm is used to solve the second-stage vehicle route scheme. Collaborative optimization is achieved through two-stage iterative feedback, ultimately outputting the warehouse location scheme, demand allocation scheme, and vehicle route scheme. Specifically, a greedy criterion of "time window priority + proximity adaptation + capacity adaptation" is used to generate initial routes that satisfy vehicle capacity constraints and time window constraints. Based on the initial demand allocation results, four initial vehicle routes are generated, with an average vehicle load factor of approximately 65%. The maximum number of iterations for the local search algorithm is set to 20, and the total cost improvement threshold is set to 0.01. Based on the initial routes, 2-opt (2-opt Algorithm, 2-swap neighborhood search algorithm), 3-opt (3-opt Algorithm, 3-swap neighborhood search algorithm), and Or-opt (Or-opt...) are used. The algorithm, which uses the Opter neighborhood search algorithm and a node moving neighborhood operator to optimize vehicle routes, introduces a variable neighborhood search mechanism. It combines route structure heuristics provided by the RF-SVR model to automatically switch neighborhood structures or apply directional perturbations to escape local optima when the algorithm stalls. Through iterative feedback, the actual route cost and route structure features from the second stage are fed back to the first stage and the RF-SVR model. The algorithm terminates when it reaches its maximum iteration count of 20 or when the relative improvement in total cost during consecutive iterations is less than 0.01. In this example, the algorithm runs for 3.12 seconds and ultimately outputs the optimal demand allocation-route delivery solution. Taking scenario 1 as an example, demand points 1, 2, 5, 6, 7, 8, and 9 are assigned to warehouse 13, and demand points 3, 4, and 10 are assigned to warehouse 11. The corresponding vehicle routes are as follows: Vehicle 1 route: Warehouse 13 → Demand Point 1 → Demand Point 6 → Demand Point 5 → Demand Point 8 → Warehouse 13; Vehicle 2 route: Warehouse 13 → Demand Point 2 → Demand Point 9 → Demand Point 7 → Warehouse 13; Vehicle 3 route: Warehouse 11 → Demand Point 10 → Warehouse 11; Vehicle 4 route: Warehouse 11 → Demand Point 4 → Demand Point 3 → Warehouse 11.

[0022] In summary, the method of this invention can achieve coordinated optimization of coal storage site selection, demand allocation, and vehicle routes under conditions of stochastic demand and transportation losses. Compared with traditional methods, this invention can more effectively balance storage construction costs, transportation costs, transportation loss costs, and service timeliness requirements, and can provide scientific and reliable decision support for coal supply chain storage layout planning, demand allocation, and vehicle scheduling.

[0023] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit them. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can still be made to the technical solutions of the present invention, and these modifications or equivalent substitutions cannot cause the modified technical solutions to deviate from the spirit and scope of the technical solutions of the present invention.

Claims

1. A two-stage optimization method for coal storage site selection and route, characterized in that, Includes the following steps: S1. Construct a two-stage stochastic optimization model with the objective of minimizing warehouse construction costs, transportation costs, loss costs, and service timeout penalty costs; S2. Use K-means to process the random demand into scenarios, generate a set of random demand scenarios, solve for the optimal path and its cost in the scenario set, and form training samples. S3. Construct an RF-SVR combined prediction model based on training samples and establish a mapping relationship between key features and vehicle routes and their costs. S4. Using a branch pricing algorithm based on Dantzig-Wolfe decomposition, solve the first-stage location allocation scheme of the two-stage stochastic optimization model. S5. Input the location allocation scheme into the RF-SVR combined prediction model to predict the initial solution of the second stage vehicle path of the two-stage stochastic optimization model. S6. Based on the initial solution, a local search algorithm is used to solve the second-stage vehicle route scheme. The two-stage collaborative optimization is achieved through iterative feedback, and the decision results are output.

2. The two-stage optimization method for coal storage site selection and route as described in claim 1, characterized in that: The two-stage stochastic optimization model consists of a first-stage strategic decision and a second-stage pursuit decision. The first stage is used to determine whether candidate warehouses should be activated and the allocation relationship between each demand point and the warehouse. The relevant formulas are as follows: (1); (2); (3); (4); (5); (6); (7); in, For the candidate repository set; For warehouse Fixed construction costs; For warehouse Whether to construct a 0-1 variable; A set of random demand scenarios; For the scene Probability of occurrence; For the scene The second phase will focus on recovering costs. For the set of demand points; For demand points Should it be allocated to the warehouse? 0-1 variables; Confidence levels are constrained by capacity opportunity; For the scene Down to the warehouse 0-1 variables that meet the capacity requirements; For the scene Next demand point Demand; For warehouse The capacity; The constraint relaxation is the large M constant; Formula (1) is the objective function of the first stage; Formulas (2)-(7) are the constraint functions of the first stage; The second stage is used to optimize vehicle routes in various scenarios based on the location selection and allocation results of the first stage. The relevant formulas are as follows: (8); (9); (10); (11); (12); (13); (14); (15); (16); (17); (18); (19); (20); (21); (22); in, Let be the set of network arcs, and ; It is a set of all nodes, and ; For vehicle assembly; For arc Unit transportation cost; For arc Transportation distance; For the scene Get off the vehicle After the arc 0-1 variables at time; For arc Unit coal loss cost coefficient; For arc Coal loss rate per unit distance; For the scene Get off the vehicle In the arc The load capacity on it; For demand points Penalty cost per unit of timeout; For the scene vehicle Arrive at the demand point The timeout period; For the scene Get off the vehicle Distribution Service Warehouse 0-1 variables at time; For vehicles Rated capacity; For the scene Get off the vehicle Arrive at the demand point Time; For arc Transportation time; For demand points Left boundary of the service time window; For demand points Right boundary of the service time window; and Eliminate auxiliary variables for the MTZ subloop; Formula (8) is the objective function for the second stage; Formulas (9)-(22) are the constraint functions for the second stage.

3. The two-stage optimization method for coal storage site selection and route as described in claim 2, characterized in that: The loss cost in S1 is calculated based on the vehicle's segmented load, transport distance, and unit loss rate.

4. The two-stage optimization method for coal storage site selection and route as described in claim 3, characterized in that, In S2: S21. Generate an initial set of random demand scenarios based on historical coal consumption data; S22. Using total demand and extreme single-point demand as clustering features, determine the number of clusters by combining the elbow rule with the silhouette coefficient. S23. Select highly representative samples from each cluster to form a set of random demand scenarios, with the sum of the weights of all scenarios being 1.

5. The two-stage optimization method for coal storage site selection and route as described in claim 4, characterized in that, In S3: S31. Perform outlier cleaning, standardization, and dataset partitioning on the sample data; S32. Taking scene, location, and allocation features as inputs and path cost as output, key features are filtered through RF, and mapping relationships are constructed through SVR. Cross-validation and grid search are used to optimize model parameters.

6. The two-stage optimization method for coal storage site selection and route as described in claim 5, characterized in that, In S4: S41. Reconstruct the first-stage model according to the warehouse service mode, and define the warehouse activation, demand service, and capacity fulfillment status as service modes. S42, For any candidate service repository ,make For its set of feasible service models, any mode in The feasibility probability of its scenario for: (23); in, For pattern In the scene The 0-1 parameter indicates whether the capacity constraint is satisfied. Comprehensive cost for: (24); in, For warehouse Adopting the pattern In the scene The path cost below; S43. Construct a constrained master problem using service patterns as an example. The relevant formulas are as follows: (25); (26); (27); (28); (29); in, For pattern Next demand point Is it from the warehouse? The service's 0-1 parameters; To select a mode The 0-1 variables; Formula (25) is the objective function that restricts the main problem; Formulas (26)-(27) are the constraint functions that restrict the main problem; S44. The RF-SVR combined prediction model is used to predict the route cost, and the approximate comprehensive cost is obtained. for: (30); in, For warehouse Adopting the pattern In the scene The predicted route cost; S45. Based on linear relaxation of the constrained principal problem, introduce dual variables to calculate the reduced cost of the computational model. for: (31); in, , , To constrain the dual variables corresponding to the main problem constraints; Based on reduced costs, a pricing sub-problem is constructed to search for negative reduced cost service models. The relevant formula is as follows: (32); (33); (34); in, For demand points Assign to warehouse 0-1 variables; For the allocation mode in the scene The 0-1 variables below satisfy the capacity constraint; Formula (32) is the objective function of the pricing subproblem; Formulas (33)-(34) are the constraint functions of the pricing subproblem; S46. Iterate the negative cost service model into the constrained master problem and solve it using a branch and bound framework to obtain the location allocation scheme.

7. The two-stage optimization method for coal storage site selection and route as described in claim 6, characterized in that, In S5: S51. Extract the warehouse location results and demand allocation scheme obtained from the first stage solution, and construct a vehicle route prediction input feature vector containing features of warehouse, demand, transportation and loss. S52. Input the input feature vector into the RF-SVR combined prediction model to complete the prediction of vehicle routes and their costs; S53. Based on the prediction results, determine the access order of demand points, form an initial vehicle route plan, and use it as the initial solution of the second-stage vehicle route optimization model.

8. The two-stage optimization method for coal storage site selection and route as described in claim 7, characterized in that: The local search algorithm in S6 uses 2-opt, 3-opt, Or-opt, and node moving neighborhood operators to optimize vehicle paths. A variable neighborhood search mechanism is introduced during the local search process. When the search stalls, the neighborhood structure is automatically switched or a directional perturbation is applied to escape the local optimum.

9. The two-stage optimization method for coal storage site selection and route as described in claim 8, characterized in that: Collaborative optimization is achieved through iterative feedback. Specifically, the real path cost and path structure characteristics of the second stage are fed back to the first stage and the RF-SVR model until the convergence condition is met, and then the final decision result is output.