Method for optimizing sampling path of materials in enterprise
By implementing material sampling path optimization methods in the enterprise, including data collection, intelligent path planning and real-time monitoring, it solves the problem that traditional manual planning is difficult to meet efficient, accurate and safe sampling path problems, and achieves improving sampling efficiency, reducing costs and enhancing production The effect of security.
Patent Information
- Application Number
- CN202411120393.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-15
- Publication Date
- 2024-12-03
AI Technical Summary
In large chemical and petrochemical enterprises, traditional manual material sampling routes are difficult to meet the needs of efficiency, accuracy and safety. Especially when there are a wide variety of materials, a wide distribution of sampling points and a high sampling frequency, how to plan the sampling path scientifically and reasonably Reducing sampling time, reducing labor costs and improving sampling efficiency has become an urgent problem.
The material sampling path optimization method is adopted in the enterprise, including data collection and preprocessing, intelligent optimization path planning, real-time monitoring and dynamic adjustment, and user terminal information sharing. Specific steps include data collection and cleaning, path evaluation and selection, real-time monitoring and adjustment, and information sharing and collaboration with user terminals.
Automatically plan the optimal path through intelligent algorithms, reduce sampling time, reduce labor costs, improve sampling efficiency, ensure the accuracy and safety of the sampling process, and have dynamic adjustment capabilities to adapt to various uncertain factors in the production process.
Smart Images

Figure CN119067278A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of path optimization, and in particular to a method for optimizing a material sampling path within an enterprise. Background Art
[0002] In the chemical and petrochemical industries, material sampling is an important part of ensuring product quality, monitoring the production process, and meeting safety standards. However, with the expansion of production scale and the complexity of process flow, the traditional manual planning of sampling routes has been unable to meet the needs of efficiency, accuracy, and safety. Especially in large chemical and petrochemical enterprises, there are many types of materials, sampling points are widely distributed, and the sampling frequency is high. How to scientifically and reasonably plan the sampling route to reduce sampling time, reduce labor costs, and improve sampling efficiency has become an urgent problem to be solved.
[0003] Publication number CN116465421A discloses a path planning method, device and medium for a petrochemical plant transport robot. Through intelligent path planning of a sampling and transport robot for laboratory samples in a petrochemical plant, the sampling route can be updated in time according to the circuit breaker information in the electronic ticket for road occupation construction, thereby realizing pre-planned routes before operation and real-time updated routes during driving, greatly saving the time for turning around and re-planning the route after encountering obstacles on site, and preventing the safety hazards caused by the transport robot turning around at any time. However, the conditions considered are not comprehensive, and the path cannot be adjusted in real time, and it is unable to cope with the occurrence of emergencies. Summary of the invention
[0004] The technical problem to be solved by the present invention is to overcome the deficiencies of the prior art and provide a method for optimizing the material sampling path within an enterprise.
[0005] The technical solution adopted by the present invention to solve the technical problem is: the material sampling path optimization method within the enterprise includes the following steps:
[0006] S1: data collection and preprocessing;
[0007] S2: Intelligently optimize the sampling path based on the collected data and determine the optimal path;
[0008] S3: Monitor the data on the optimal path in real time to see if there are any anomalies, and dynamically adjust the optimal path;
[0009] S4: Real-time interaction with user terminals to share and collaborate on information.
[0010] In S1, multi-dimensional data of the enterprise is collected, and the data is cleaned, verified and formatted, so as to ensure the accuracy and completeness of the data and provide a solid foundation for subsequent path optimization.
[0011] The enterprise's multi-dimensional data includes relevant equipment or product data, truck data, sampling point constraints and other influencing factor data.
[0012] Specifically,
[0013] Device or product data: location of the device or product, sampling requirements and relevant safety regulations;
[0014] Among them, the location information of each device or product (such as longitude and latitude coordinates, room number and production line number, etc.) is used to plan the sampling route;
[0015] Sampling requirements are the specific requirements such as sampling type, sampling volume and sampling frequency required for each device or product, which are used to select the sampling sequence and path;
[0016] Safety regulations include protective measures during sampling, prohibited areas, etc. These regulations are used as constraints during path planning.
[0017] Truck data: truck operation status and location information;
[0018] Among them, the truck operation status includes arrival and departure time, which records the time points when the truck arrives and leaves the sampling area, and is used to consider the time window when planning the route; loading and unloading status: real-time monitoring of the loading and unloading status of the truck, and different sampling operations are required before and after loading and unloading;
[0019] Location information: The loading and unloading locations of the truck so that the sampling route can be adjusted in time when necessary.
[0020] The sampling point constraints are unique: ensure that each sampling point is visited only once (unless there is a requirement for repeated sampling), time window: each sampling point may have a specific sampling time window, and sampling needs to be completed within this window, safety distance: consider the safety distance requirements between sampling points to avoid danger during the sampling process, and simultaneity restrictions: some sampling points may not allow simultaneous sampling, and a suitable sequence or interval needs to be planned.
[0021] Other influencing factors include: Traffic conditions: Traffic conditions within the plant, such as road congestion, construction areas, etc., which may affect the selection and timing of sampling routes;
[0022] Staff availability: Understand the number and availability of analytical laboratory staff so that human resource allocation can be considered when planning routes;
[0023] Weather conditions: Some sampling operations may be affected by weather conditions (e.g. outdoor sampling cannot be performed on rainy days), so weather factors need to be considered during planning;
[0024] Equipment status: Check whether the equipment required for sampling is in good condition to avoid delays in sampling due to equipment failure;
[0025] Sampling task priority: Set priorities for different sampling tasks based on business needs or emergencies to ensure that critical tasks are handled first.
[0026] The S2 comprises the following sub-steps:
[0027] S21: load data, initialize an empty path set PathSet and an empty candidate optimal path BestPath, and set a sufficiently large initial cost BestCost as a comparison benchmark;
[0028] S22: define auxiliary functions;
[0029] S23: Perform path evaluation and selection.
[0030] In S21, the loaded data includes
[0031] The set of sampling points N, N = {1, 2, ..., n}, where n is the total number of sampling points, the geographical location coordinates (x i ,y i );
[0032] Path: includes a possible sampling path P, represented as a permutation of sampling points, such as P = (1, 3, 2, 4), and the set of all possible paths PathSet;
[0033] Cost ij : The cost from sampling point i to sampling point j (such as manpower, equipment depreciation, etc.);
[0034] Time ij : The time from sampling point i to sampling point j (including moving time and sampling time);
[0035] Safety ij : Safety factor from sampling point i to sampling point j, Safety ij It is a value between 0 and 1, 1 means the safest;
[0036] Constraint data: time window T including sampling point i i , indicating the earliest and latest sampling time; the minimum safe distance D between sampling points i and j ij ; Boolean Simultaneous i , indicating whether sampling point i is allowed to sample simultaneously (allowed is False, not allowed is True);
[0037] Other factors: including the traffic condition coefficient at time t (which affects time and cost), the availability of personnel or equipment at time t t , the weather condition coefficient Weather at time t t (Affects safety and time consumption).
[0038] The auxiliary functions in S22 include
[0039] Time function Time(i, j, t): calculates the time from point i to point j based on the current time t, traffic conditions Traffict, and weather conditions Weathert;
[0040] Cost function Cost(i, j, t): Based on the time consumption Time(i, j, t) and cost coefficient Cost ij , personnel or equipment availability Availabilityt calculates costs;
[0041] Check constraint function CheckConstraints(P,t): Checks whether the path P satisfies all constraints (time window, safety distance, simultaneity restrictions) at time t.
[0042] The S23 comprises the following sub-steps:
[0043] S231: For each generated candidate path P, calculate its total cost TotalCost, the calculation formula is:
[0044] TotalCost(P)=∑ (i,j)∈P (Cost(i,j,time(j))·Traffictime(j)·Weathertime(j)·Availab
[0045] ilitytime(j));
[0046] Where time(j) is the time to access point j calculated based on path P and the time consumed by the previous points;
[0047] S232: Check whether the path satisfies all constraints. If the total cost of the path is less than BestCost and satisfies all constraints, update the path to the optimal path BestPath and the optimal cost BestCost and then output them.
[0048] The constraints include
[0049] Each sampling point must be visited once and only once, unless there is a clear instruction to repeat the sampling;
[0050] The sampling path must satisfy the time window constraints of all sampling points:
[0051] Tistart≤time(i)≤Tiend
[0052] Wherein, Tistart represents the start time of the time window of sampling point i, Tiend represents the end time of the time window of sampling point i, time(i) is the time to visit sampling point i, which needs to be calculated based on the time consumption of path P and the previous point;
[0053] The sampling path must comply with the safety distance constraint:
[0054] Distance(xi,yi,xj,yj)≥Dij for all (i,j)∈P and i≠j;
[0055] Among them, (xi,yi) and (xj,yj) are the geographical coordinates of sampling points i and j respectively, Dij represents the minimum safe distance between sampling points i and j; the distance between any two adjacent sampling points i and j is greater than or equal to the minimum safe distance Dij between them;
[0056] The sampling paths must obey the simultaneity constraints:
[0057] If Simultaneousi=False, then for all (i,j)∈P and (k,i)∈P, time(i) is not equal to time(k);
[0058] Traffic conditions, personnel or equipment availability and weather conditions are known or predictable during planning, and these factors have been reflected in the objective function and possible time calculation through the coefficients Traffic, Availabilityt, Weathert;
[0059] Path continuity (implicit in the path definition): The definition of path P already implies continuity.
[0060] Because it is an ordered sequence of sampling points from the starting point to the end point.
[0061] In S3, the data determining the optimal path (such as traffic conditions, personnel / equipment availability, weather conditions) are monitored in real time to see if they change. If so, the current path set is re-evaluated and necessary adjustments are made.
[0062] Compared with the prior art, the present invention has the following beneficial effects:
[0063] Improve sampling efficiency: Automatically plan the optimal path through intelligent algorithms, reduce sampling time, and improve sampling efficiency;
[0064] Reduce labor costs: Automated path planning reduces reliance on manual planning and reduces labor costs;
[0065] Improve product quality: Ensuring the accuracy and timeliness of the sampling process helps improve product quality;
[0066] Enhance production safety: Comprehensively consider safety regulations and constraints to reduce safety risks during sampling;
[0067] Strong adaptability: It has the ability to dynamically adjust and optimize, and can cope with various uncertainties in the production process. BRIEF DESCRIPTION OF THE DRAWINGS
[0068] Figure 1 This is a flow chart of the sampling path optimization method of the present invention;
[0069] Figure 2 This is a flow chart of the path optimization algorithm of the present invention. DETAILED DESCRIPTION
[0070] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0071] Reference Figure 1-Figure 2 ,The optimization method for material sampling path in an enterprise includes the following steps:
[0072] S1: Data collection and preprocessing: In S1, multi-dimensional data of enterprises are collected, and the data is cleaned, verified and formatted. This ensures the accuracy and completeness of the data, providing a solid foundation for subsequent path optimization.
[0073] Furthermore, data cleaning mainly corrects errors in data, eliminates duplicates, fills missing values, etc., to improve the quality and availability of data. Among them, correcting errors: correcting spelling errors, format errors, etc. in data. Example: Correct the wrong date format "03-03-2028" to "2028-03-03"; Deleting duplicates: Identify and delete duplicate records, check each record in the data set, compare it with the processed records, and if they are exactly the same, they are considered duplicates and deleted; Processing missing values: Delete records containing missing values, fill missing values with statistical values (such as mean, median), use prediction models (such as k-nearest neighbor algorithm) to fill missing values, etc. Choose the appropriate method based on the number of missing values, the distribution characteristics of the data, and business needs. For example, if there are few missing values and they have little impact on the overall data analysis, you can choose to delete them; if there are many missing values and the data distribution is relatively uniform, you can choose to fill them with the mean or median.
[0074] Data verification is to ensure the integrity and accuracy of data. Data verification includes format verification: checking whether the format of data is as expected, for example: checking whether the geographic coordinates are in the format of ^-? (\d{1,2}|1[0-7]\d|180)(\.\d+)? $|^-? ([0-8]?\d|90)(\.\d+)? $; consistency verification: checking the consistency of data between different tables or fields. For tables or fields with associated relationships, potential errors can be identified by comparing whether the data between them is consistent; checksum / hash verification: using hash algorithms such as MD5 and SHA-256 to calculate data, generate checksums, and verify after data transmission or storage. The original data is processed by the hash algorithm to obtain a fixed-length hash value (checksum). The data receiver or verifier uses the same algorithm to process the received data. If the hash value obtained is consistent with the hash value provided by the sender, it is considered that the data has not been tampered with during transmission or storage.
[0075] Data formatting refers to converting data into a format suitable for subsequent analysis or storage, including data type conversion: using the type conversion function in the database or data processing tool to convert one data type from one to another, for example: converting the string type date "March 3, 2028" to the date type DATE; data standardization: processing data uniformly according to certain rules, such as unifying the time format, currency unit, encoding standard, etc.; data aggregation / summary: using SQL aggregation functions (such as SUM, AVG, COUNT, etc.) or aggregation functions in data processing tools to summarize data.
[0076] The enterprise's multi-dimensional data includes relevant equipment or product data, truck data, sampling point constraints and other influencing factor data.
[0077] Specifically, the device or product data includes the location of the device or product, sampling requirements and relevant safety regulations; among them, the location information of each device or product (such as longitude and latitude coordinates, room number and production line number, etc.) is used to plan the sampling route; the sampling requirements are the specific requirements such as sampling type, sampling quantity and sampling frequency required for each device or product, which are used to select the sampling sequence and path; the safety regulations are protective measures during sampling, prohibited areas, etc., and these regulations are used as constraints during path planning.
[0078] Truck data includes truck operation status and location information; truck operation status includes arrival and departure time, which records the time points when the truck arrives at and leaves the sampling area, and is used to consider the time window when planning the route; loading and unloading status: real-time monitoring of the loading and unloading status of the truck, and different sampling operations are required before and after loading and unloading; location information: the loading and unloading position of the truck, so as to adjust the sampling route in time when necessary.
[0079] Sampling point constraints include
[0080] Uniqueness: ensure that each sampling point is visited only once (unless repeated sampling is required);
[0081] Time window: Each sampling point may have a specific sampling time window, and sampling needs to be completed within this window;
[0082] Safety distance: Consider the safety distance requirements between sampling points to avoid danger during the sampling process;
[0083] Simultaneity restrictions: Some sampling points may not allow simultaneous sampling, and a suitable sequence or interval needs to be planned.
[0084] Other influencing factors include:
[0085] Traffic conditions: Traffic conditions within the plant, such as road congestion, construction areas, etc. These factors may affect the selection and time of sampling routes;
[0086] Staff availability: Understand the number and availability of analytical laboratory staff so that human resource allocation can be considered when planning routes;
[0087] Weather conditions: Some sampling operations may be affected by weather conditions (e.g. outdoor sampling cannot be performed on rainy days), so weather factors need to be considered during planning;
[0088] Equipment status: Check whether the equipment required for sampling is in good condition to avoid delays in sampling due to equipment failure;
[0089] Sampling task priority: Set priorities for different sampling tasks based on business needs or emergencies to ensure that critical tasks are handled first.
[0090] S2: intelligently optimize the sampling path based on the collected data to determine the optimal path; S2 includes the following sub-steps:
[0091] S21: load data, initialize an empty path set PathSet and an empty candidate optimal path BestPath, and set a sufficiently large initial cost BestCost as a comparison benchmark;
[0092] In S21, the loaded data includes
[0093] The set of sampling points N, N = {1, 2, ..., n}, where n is the total number of sampling points, the geographical location coordinates (x i ,y i );
[0094] Path: includes a possible sampling path P, represented as a permutation of sampling points, such as P = (1, 3, 2, 4), and the set of all possible paths PathSet;
[0095] Cost ij : The cost from sampling point i to sampling point j (such as manpower, equipment depreciation, etc.);
[0096] Time ij : The time from sampling point i to sampling point j (including moving time and sampling time);
[0097] Safety ij : Safety factor from sampling point i to sampling point j, Safety ij It is a value between 0 and 1, 1 means the safest;
[0098] Constraint data: time window T including sampling point i i , indicating the earliest and latest sampling time; the minimum safe distance D between sampling points i and j ij ; Boolean Simultaneous i , indicating whether sampling point i is allowed to sample simultaneously (allowed is False, not allowed is True);
[0099] Other factors: including the traffic condition coefficient at time t (which affects time and cost), the availability of personnel or equipment at time t t , the weather condition coefficient Weather at time t t (Affects safety and time consumption).
[0100] S22: define auxiliary functions; the auxiliary functions in S22 include
[0101] Time function Time(i, j, t): Calculates the time from point i to point j based on the current time t, traffic conditions Traffic, and weather conditions Weathert. The calculation formula is:
[0102] Time(i,j,t)=Distance(i,j) / (SpeedBase*Traffic*Weathert);
[0103] Where Distance(i,j) represents the straight-line distance or path length between sampling points i and j; SpeedBase represents a basic speed constant, representing the average moving speed under ideal conditions; Traffic and Weathert are coefficients between 0 and 1, representing the impact of traffic conditions and weather conditions on speed, respectively. For example, Traffic may be close to 0 in traffic congestion, while Weathert is close to 1 in good weather;
[0104] This function Cost(i, j, t): based on the time consumption Time(i, j, t) and the cost coefficient Cost ij , personnel or equipment availability Availabilityt calculates the cost, and the calculation formula is:
[0105] Cost(i,j,t)=Time(i,j,t)*Cost ij +FixedCost+Availabilityt*AdjustmentFactor;
[0106] Where FixedCost is the fixed cost of each move or each sampling; Availabilityt represents the availability of personnel or equipment at time t, and Availabilityt is a coefficient between 0 and 1; AdjustmentFactor is an adjustment factor that may be adjusted according to specific business logic, such as cost discounts for night operations;
[0107] CheckConstraints(P,t): Checks whether the path P satisfies all constraints (time window, safety distance, simultaneity restrictions) at time t. The code involved is as follows:
[0108] functionCheckConstraints(P,t):
[0109] #Assume that P is a path list containing a sequence of sampling points
[0110] #t is the current time
[0111] #current_pointCurrent sampling point
[0112] #ext_point next sampling point
[0113] #MinimumSafeDistanceMinimum safe distance
[0114] foriinrange(len(P)-1):#Traverse the adjacent sampling point pairs in the path
[0115] #Sampling point index
[0116] current_point = P[i]
[0117] next_point = P[i+1]
[0118] #Time window constraints
[0119] ifnot(time_within_window(current_point,t)andtime_within_window(next_point,t+Time(current_point,next_point,t))):
[0120] returnFalse
[0121] #Safety distance constraints
[0122] ifDistance(current_point,next_point) <MinimumSafeDistance:
[0123] returnFalse
[0124] #Simultaneity limit (if applicable)
[0125] ifSimultaneous[current_point]andSimultaneous[next_point]andnotcan_sample_sim ultaneously(current_point,next_point):
[0126] returnFalse
[0127] #Other constraints (such as specific equipment requirements, personnel qualifications, etc.)
[0128] # If all constraints are satisfied, return True
[0129] returnTrue
[0130] #Auxiliary function (not a formula, just for illustration)
[0131] functiontime_within_window(point,t):
[0132] # Check whether the time point t is within the time window of the sampling point point
[0133] returnt>=point.earliest_timeandt<=point.latest_time
[0134] functionDistance(point1,point2):
[0135] Calling the Map API
[0136] return distance
[0137] S23: Perform path evaluation and selection.
[0138] The S23 comprises the following sub-steps:
[0139] S231: For each generated candidate path P, calculate its total cost TotalCost, the calculation formula is:
[0140] TotalCost(P)=∑ (i,)∈P (Cost(i,j,time(j))·Traffictime(j)·Weathertime(j)·Availabilitytime(j));
[0141] Where time(j) is the time to access point j calculated based on path P and the time consumed by the previous points;
[0142] S232: Check whether the path satisfies all constraints. If the total cost of the path is less than BestCost and satisfies all constraints, update the optimal path BestPath and the optimal cost BestCost and output them.
[0143] The constraints include:
[0144] Each sampling point must be visited once and only once, unless there is a clear instruction to repeat the sampling;
[0145] The sampling path must satisfy the time window constraints of all sampling points:
[0146] Tistart≤time(i)≤Tiend
[0147] Wherein, Tistart represents the start time of the time window of sampling point i, Tiend represents the end time of the time window of sampling point i, time(i) is the time to visit sampling point i, which needs to be calculated based on the time consumption of path P and the previous point;
[0148] The sampling path must comply with the safety distance constraint:
[0149] Distance(xi,yi,xj,yj)≥Dij for all (i,j)∈P and i≠j;
[0150] Among them, (xi,yi) and (xj,yj) are the geographical coordinates of sampling points i and j respectively, Dij represents the minimum safe distance between sampling points i and j; the distance between any two adjacent sampling points i and j is greater than or equal to the minimum safe distance Dij between them;
[0151] The sampling paths must obey the simultaneity constraints:
[0152] If Simultaneousi=False, then for all (i,j)∈P and (k,i)∈P, time(i) is not equal to time(k);
[0153] Traffic conditions, personnel or equipment availability and weather conditions are known or predictable during planning, and these factors have been reflected in the objective function and possible time calculation through the coefficients Traffic, Availabilityt, Weathert;
[0154] Path continuity (implicit in the path definition): The definition of a path P already implies continuity, since it is an ordered sequence of sampling points from the start point to the end point.
[0155] This application calculates and compares the time consumption, cost (including labor cost, time cost, etc.) and safety of different paths, comprehensively considers all constraints, and generates the optimal path solution
[0156] S3: Monitor the data on the optimal path in real time for any anomalies, and dynamically adjust the optimal path. In S3, monitor in real time whether the relevant data that determines the optimal path (such as traffic conditions, personnel / equipment availability, weather conditions) has changed. If so, re-evaluate the current path set and make necessary adjustments. Based on the anomaly detection and early warning mechanism, monitor in real time whether any abnormal conditions (such as equipment failure, traffic congestion, weather changes, etc.) occur, and dynamically adjust the sampling path based on real-time data. Once an abnormal condition is found, immediately trigger the re-planning process to quickly generate a new optimal path.
[0157] If real-time data (such as traffic conditions, personnel / equipment availability, weather conditions) changes, re-evaluate the current set of paths and make necessary adjustments. Specifically, local search techniques (such as 2-opt, neighborhood search) can be used to optimize existing paths.
[0158] S4: Real-time interaction with user terminals for information sharing and collaboration. This application provides a user-friendly interface to support operators to input sampling tasks, view sampling path planning results, monitor the sampling process in real time, and compare and analyze with historical data. It supports seamless integration and data exchange with other enterprise information systems (such as LIMS systems) to achieve information sharing and collaborative work.
[0159] This application uses intelligent algorithms to achieve efficient planning and optimization of sampling routes. Based on advanced route planning technology and real-time data processing capabilities, it can comprehensively consider multiple factors such as material type, sampling point location, sampling requirements, traffic conditions, personnel and equipment availability, and automatically generate the optimal sampling route plan to solve the problems of low sampling efficiency, high labor costs and production safety in chemical and petrochemical enterprises.
[0160] The above descriptions are only optional embodiments of the present invention, and are not intended to limit the patent scope of the present invention. All equivalent structural changes made using the contents of the present invention's specification and drawings, or directly / indirectly applied in other related technical fields, are included in the patent protection scope of the present invention.
Claims
1. A method for optimizing material sampling paths within an enterprise, characterized in that: The steps include: S1: data collection and preprocessing; S2: Intelligently optimize the sampling path based on the collected data and determine the optimal path; S3: Monitor the data on the optimal path in real time to see if there are any anomalies, and dynamically adjust the optimal path; S4: Real-time interaction with user terminals to share and collaborate on information.
2. The method for optimizing material sampling paths within an enterprise according to claim 1, characterized in that: In S1, multi-dimensional data of the enterprise is collected, and the data is cleaned, verified and formatted.
3. The method for optimizing material sampling paths within an enterprise according to claim 2, characterized in that: The enterprise's multi-dimensional data includes relevant equipment or product data, truck data, sampling point constraints and other influencing factor data.
4. The method for optimizing material sampling paths within an enterprise according to claim 3, characterized in that: The device or product data includes the location of the device or product, sampling requirements and relevant safety regulations; Truck data includes truck operation status and location information; Sampling point constraints include uniqueness, time window, safety distance, and simultaneity restrictions; Other influencing factors include traffic conditions, personnel availability, weather conditions, equipment status, and sampling task priority.
5. The method for optimizing material sampling paths within an enterprise according to claim 2, characterized in that: The S2 comprises the following sub-steps: S21: load data, initialize an empty path set PathSet and an empty candidate optimal path BestPath, and set an initial cost BestCost as a comparison benchmark; S22: define auxiliary functions; S23: Perform path evaluation and selection.
6. The method for optimizing material sampling paths within an enterprise according to claim 5, characterized in that: In S21, the loaded data includes The set of sampling points N, N = {1, 2, ..., n}, where n is the total number of sampling points, the geographical location coordinates (x i ,y i ); Path: includes a possible sampling path P and a set of all possible paths PathSet; Cost ij : The cost from sampling point i to sampling point j; Time ij : The time from sampling point i to sampling point j; Safety ij : Safety factor from sampling point i to sampling point j, Safety ij It is a value between 0 and 1, 1 means the safest; Constraint data: time window T including sampling point i i , represents the earliest and latest sampling time; The minimum safe distance D between sampling points i and j ij ; Boolean Simultaneous i , indicating whether sampling point i is allowed to be sampled simultaneously; Other factors: including the traffic condition coefficient at time t, the availability of personnel or equipment at time t t , the weather condition coefficient Weather at time t t .
7. The method for optimizing material sampling paths within an enterprise according to claim 6, characterized in that: The auxiliary functions in S22 include Time function Time(i, j, t): calculates the time from point i to point j based on the current time t, traffic conditions Traffict, and weather conditions Weathert; Cost function Cost(i, j, t): Based on the time consumption Time(i, j, t) and cost coefficient Cost ij , personnel or equipment availability Availabilityt calculates costs; Check constraint function CheckConstraints(P,t): Checks whether the path P satisfies all constraints at time t.
8. The method for optimizing material sampling paths within an enterprise according to claim 7, characterized in that: The S23 comprises the following sub-steps: S231: For each generated candidate path P, calculate its total cost TotalCost, the calculation formula is: TotalCost(P)=∑ (i,j)∈P (Cost(i,j,time(j))·Traffictime(j)·Weathertime(j)·Availa bilitytime(j)); Where time(j) is the time to access point j calculated based on path P and the time consumed by the previous points; S232: Check whether the path satisfies all constraints. If the total cost of the path is less than BestCost and satisfies all constraints, update the path to the optimal path BestPath and the optimal cost BestCost and then output them.
9. The method for optimizing material sampling paths within an enterprise according to claim 8, characterized in that: The constraints include Each sampling point must be visited once and only once, unless there is a clear instruction to repeat the sampling; The sampling path must satisfy the time window constraints of all sampling points: Tistart≤time(i)≤Tiend Wherein, Tistart represents the start time of the time window of sampling point i, Tiend represents the end time of the time window of sampling point i, time(i) is the time to visit sampling point i, which needs to be calculated based on the time consumption of path P and the previous point; The sampling path must comply with the safety distance constraint: Distance(xi,yi,xj,yj)≥Dij, (i,j)∈P and i≠j; (xi,yi) and (xj,yj) are the geographical coordinates of sampling points i and j respectively, Dij represents the minimum safety distance between sampling points i and j; the distance between any two adjacent sampling points i and j is greater than or equal to the minimum safety distance Dij between them; The sampling path must obey the simultaneity constraint: if Simultaneousi=False, then (i,j)∈P and (k,i)∈P, time(i) is not equal to time(k).
10. The method for optimizing material sampling paths within an enterprise according to claim 9, characterized in that: In S3, whether the data determining the optimal path changes is monitored in real time. If it changes, the current path set is re-evaluated and adjusted.
