K-means clustering algorithm-based field bridge operation area dynamic division method
The dynamic division of the field bridge operation area through the K-means clustering algorithm solves the problems of instability caused by traditional manual scheduling and the inability to update static plans, and achieves more efficient and balanced field bridge operation allocation.
Patent Information
- Application Number
- CN202411989678.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-31
- Publication Date
- 2025-05-23
AI Technical Summary
Traditional yard bridge scheduling relies on manual allocation, resulting in unstable instruction allocation and difficult to achieve reasonable allocation, resulting in low working efficiency of yard bridges, and static operation area plans cannot be updated in time, and cannot adapt to dynamic yard command changes.
The dynamically divided field bridge operation area method based on the K-means clustering algorithm is adopted. By obtaining field stack information, clustering operation instructions, and dynamically adjusting the cluster center point, ensuring the balance of the operation instruction set of each field bridge, forming the optimal operation plan.
It realizes dynamic adjustment of the operation area to adapt to changes in yard commands, avoids blind shortest path misunderstandings, and improves the balance and efficiency of yard and bridge operations.
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of terminal automated yard crane dispatching, and in particular relates to a method for dynamically dividing yard crane operation areas based on a K-means clustering algorithm. Background Art
[0002] The yard crane includes tire-mounted gantry crane (RTG) and rail-mounted gantry crane (RMG), which are special machines for loading, unloading, handling and stacking operations in the container terminal yard. With the development of automation technology, the yard crane can be remotely controlled by arranging various devices on the yard crane equipment, which is called an automated yard crane. The yard of the container terminal is usually divided into multiple blocks (BLOCK), which constitute the container area of the yard; each container area is divided into multiple bays (BAY), each bay can be divided into multiple rows (STACK), and each row has multiple layers (TIER). The automated yard crane travels in each yard block (container area), stops at a bay, and operates the container instructions of that bay.
[0003] In traditional technology, yard crane dispatching is mostly done by manually assigning instructions. Different people have different assignment results. The yard crane instruction assignment is unstable and uncertain, and it is difficult to achieve reasonable assignment, resulting in low yard crane work efficiency. Moreover, the dispatcher usually only divides a static mechanical operation area plan, and then may not be able to update the mechanical operation area plan in time. The yard's operation instructions are changing rapidly, and the static area operation plan is out of touch with the dynamic instruction changes. At the same time, the traditional yard area plan division can easily cause the yard crane to fall into the blind shortest path misunderstanding, resulting in unbalanced overall yard bridge operations, which leads to low terminal yard operation efficiency. Summary of the invention
[0004] The object of the present invention is to provide a method for dynamically dividing the field bridge operation area based on the K-means clustering algorithm to solve the proposed technical problem, comprising the following steps: S1 Obtaining the yard pile information; the yard pile information includes the yard pile condition, the yard bridge information and the operation instruction information; the yard pile condition includes the bay position information of the yard pile; the yard bridge information includes the number of the yard bridges, the location of the yard bridges and the operation range of the yard bridges; the operation instruction information includes the instruction type, the instruction start position and the instruction end position; S2 takes the operation instruction as a sample, selects one of the instruction start position and the instruction end position as the sample coordinate of the operation instruction according to the instruction class table of the operation instruction, and obtains a cluster sample set of the operation instruction; S3: Take the number of field bridges as the K value of K-means clustering, the current field bridge position as the initial clustering center, the clustering sample set of the operation instruction as the clustering target, and the distance between the sample coordinates and the field bridge position as the clustering basis to perform initial clustering and obtain K clusters; after clustering, verify the validity of the samples in each cluster, extract and mark the invalid samples, and re-cluster the point; S4 recalculates the center points of the K clusters and performs iterative clustering. During the iteration, the marked sample points are selectively clustered. After the iterative clustering is completed, the validity of the samples in each cluster is verified, the invalid samples are extracted and marked, and the point is re-clustered; S5 repeats step S4 until the iteration is completed or the number of iterations is reached; S6: Perform a balance adjustment on the K clusters finally obtained to obtain the operation instruction set of each field bridge; Each S7 crane selects instructions from each operation instruction set based on the optimal principle to form an operation plan for the crane.
[0005] Furthermore, the instruction categories of the operation instructions in steps S1 and S2 include packing instructions and unloading instructions. When the instruction category is a packing instruction, the sample coordinates of the operation instruction are the instruction starting position; when the instruction category is an unloading instruction, the sample coordinates of the operation instruction are the instruction ending position.
[0006] Furthermore, the validity of the sample within the cluster in step S3 means that the sample coordinates of the instruction within the cluster are within the operating range of the field bridge corresponding to the cluster.
[0007] Furthermore, in step S4, the method of extracting invalid samples and re-clustering the points is as follows: the distance between the marked sample points and the cluster center points corresponding to their marks is not calculated, and clustering is only performed on the remaining clusters; any sample point may have more than one mark.
[0008] Furthermore, the iteration completion in step S5 means that after any two consecutive iterations, the positions of the center points of each cluster remain unchanged and there are no new sample points with labels.
[0009] Furthermore, the method for performing balance adjustment on the finally obtained K clusters in step S6 is: Set a minimum number of instructions for each cluster, take any end of the field stack as the starting point, and query the number of instructions in the corresponding cluster of each field bridge in turn. When there is a cluster with less than the minimum number of instructions, select valid sample points from the adjacent clusters on both sides to supplement it until the number of samples in all clusters is greater than the minimum number of instructions.
[0010] Furthermore, when there are multiple clusters that need to be supplemented, the direction of supplementing samples of each cluster is determined with the largest cluster as the center point.
[0011] Furthermore, in step S7, each field crane selects instructions in each operation instruction set based on the optimal principle to form an operation plan of the field crane as follows: With the purpose of minimizing the moving distance of the field crane or minimizing the field crane operation time, instructions in a number of operation instruction sets are selected in sequence to form an operation plan for the field crane. The present invention has the following beneficial effects: The present invention solidifies the traditional manual experience, pre-divides the instruction set according to the changes in the yard instructions, through the K-means clustering algorithm, and combines the relevant operation factors to allocate the operation plan to the instruction set divided by each yard bridge. Compared with the overall plan in the prior art, it greatly reduces the amount of calculation and simplifies the operation of the salesperson. The present invention plans the optimal operation area under multi-task conditions, pushes the optimal operation task under the condition of mechanical idleness, avoids falling into the "blind" shortest path misunderstanding, and balances the automatic yard bridge operation allocation, so that the operation efficiency of each bridge in the horizontal channel is at a higher level. DETAILED DESCRIPTION
[0012] The technical solutions in the embodiments of the present invention are described clearly and completely below. 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. Example
[0013] This embodiment provides a method for dynamically dividing the field bridge operation area based on the K-means clustering algorithm for quickly allocating the field bridge operation area. Compared with the multi-index field bridge planning method in the prior art, the method of this embodiment has less calculation and can avoid the situation where the field bridge is clustered, thereby improving the overall operation efficiency. The method of this embodiment includes the following steps: S1 obtains field stack information.
[0014] The yard pile information described in this step can refer to the yard pile actually divided by the container terminal, or it can be a virtual yard pile formed by the terminal closing multiple physical yard piles according to the plan. This type of yard pile has corresponding bay position information and there is at least one yard bridge that can operate across areas, so that an overall operation plan can be arranged.
[0015] Correspondingly, it is necessary to obtain the information of the field cranes operating in the field pile, including the number of field cranes, the current position of the field cranes and the operating range of the field cranes.
[0016] S2 takes the operation instruction as a sample, selects one of the instruction start position and the instruction end position as the sample coordinate of the operation instruction according to the instruction class table of the operation instruction, and obtains a clustered sample set of the operation instruction.
[0017] As the distribution target of this embodiment, the operation instruction needs to obtain at least the instruction category, instruction starting position and instruction ending position to confirm its sample coordinates. This embodiment takes the packing instruction and unloading instruction as examples. When the instruction category is the packing instruction, the sample coordinates of the operation instruction are the instruction starting position; when the instruction category is the unloading instruction, the sample coordinates of the operation instruction are the instruction ending position. Of course, the operation instructions of the container terminal are not only the packing instructions and unloading instructions. Other types of instructions can select the appropriate position as their sample coordinates according to their instruction type.
[0018] S3 uses the number of field bridges as the K value of K-means clustering, the current field bridge position as the initial clustering center, the clustering sample set of the operation instruction as the clustering target, and the distance between the sample coordinates and the field bridge position as the clustering basis to perform initial clustering and obtain K clusters; remove invalid samples and re-cluster the point.
[0019] S4 recalculates the center points of the K clusters and performs iterative clustering. During the iteration, the marked sample points are selectively clustered. After the iterative clustering is completed, the validity of the samples in each cluster is verified, invalid samples are removed, and the point is re-clustered.
[0020] According to the operating characteristics of the container terminal, the yard pile is displayed in a one-dimensional coordinate system. The bay position can be used as the coordinate of the coordinate system. The yard crane operates back and forth on this coordinate system. Therefore, the division of operating instructions can be converted into coordinate division on a one-dimensional coordinate system.
[0021] There are some basic characteristics of field bridge operation: the field bridge cannot cross another field bridge operation and the field bridge movement cannot exceed the actual cable outlet operation range. When a certain instruction is classified into a cluster of a cluster center, the actual operation range of the machine needs to be considered, that is, the bay division of the instruction cannot exceed the actual operation range of the machine, and considering the extreme case, there may be a certain instruction that is continuously assigned to the field bridge cluster that exceeds the operation range according to the distance, so it is set that any sample can have more than one mark. The mark of any sample has its corresponding cluster label, that is, the field bridge label. At this time, when clustering, the distance calculation of the cluster center corresponding to the marked field bridge is skipped, and only the distance to other cluster centers is calculated. According to the characteristics of the field pile and field bridge, there is no instruction sample that exceeds the operation range of all field bridges; nor can there be an instruction that requires the field bridge closest to it to cross a field bridge to reach the bay where the instruction is located. Therefore, in theory, after multiple iterations, all instructions can eventually be divided into the operation instruction set of a field bridge.
[0022] Considering that some operation instructions are related, such as a one-car double-lift operation, there are two loading instructions, and two containers need to be placed on the same trailer. In general container business allocation, one yard crane is usually assigned to execute the two operation instructions of the one-car double-lift operation. For this reason, the task instructions can be marked with relevance, and specific clustering can be achieved through relevance marking. Specifically, several instruction samples with related instructions are marked with relevance, and these relevance markings can be either the relevance between instructions or the relevance between instructions and yard cranes.
[0023] In summary, when performing the clustering operation in steps S3 and S4, the tags of the instruction sample are read before clustering: When there is an invalid mark, the calculation of the center point of the cluster corresponding to the instruction sample and the mark is skipped when calculating the distance to the cluster center point; When there are correlation marks between instructions, the center point of the correlation instruction is calculated first, and the distance to the center point of each cluster is calculated based on the center point; when performing validity verification, when any correlation instruction sample is verified as an invalid sample and marked as invalid, the group of correlation instruction samples skips the cluster corresponding to the invalid sample when calculating the distance to the cluster center point; if there is a group of correlation instruction samples that cannot be clustered into any cluster, you can choose to manually divide or cancel the correlation mark and cluster them separately.
[0024] When there is a correlation mark between the instruction and the field bridge, the validity of the instruction sample and the field bridge is limitedly verified. If valid, it is directly assigned to the cluster corresponding to the field bridge; if the verification is invalid, you can choose to manually divide or cancel the correlation mark and re-cluster.
[0025] S5 Repeat step S4 until the iteration is completed or the number of iterations is reached.
[0026] Iteration completion means that after any two consecutive iterations, the position of the center point of each cluster remains unchanged and there are no new marked sample points. From the above, we can see that theoretically, there is an upper limit on the number of iterations for cluster iterations in a one-dimensional coordinate system, and all sample coordinates can be clustered in the end. However, considering the actual application scenario, the field bridge does not have to complete all job instructions at once, and new instructions will appear as the field stack situation changes. Therefore, an upper limit on the number of iterations can be set to avoid wasting computing power.
[0027] S6 performs a balance adjustment on the K clusters finally obtained to obtain the operation instruction set of each field bridge.
[0028] This step takes into account the extreme situation of the yard pile. When the containers are piled up and some yard cranes are far away from the containers at the beginning, there may be a situation where the yard cranes far away cannot be assigned to the operation instructions. Therefore, after the clustering is completed, it is necessary to divide the whole evenly so that each yard crane can be assigned to the role as much as possible to improve the overall efficiency.
[0029] Set a minimum number of instructions for each cluster, take any end of the field pile as the starting point, and query the number of instructions in the corresponding cluster of each field bridge in turn. When there is a cluster with less than the minimum number of instructions, select valid sample points from the adjacent clusters on both sides to supplement until the number of samples in all clusters is greater than the minimum number of instructions. The minimum number of instructions here can be set according to the field bridge operation situation. Theoretically, the optimal value is the average number of operation instructions that can be performed in the interval between two dynamic divisions of the field bridge operation area.
[0030] When selecting valid sample points from adjacent clusters on both sides for supplementation, there may be invalid mutual supplementation (the sum of the number of instructions in the two adjacent clusters is less than twice the minimum number of instructions). Therefore, when there are multiple clusters that need to be supplemented, the direction of sample supplementation for each cluster can be determined with the largest cluster as the center point. That is, the center point is used to supplement both sides in a one-way manner, and the insufficient clusters after supplementation are supplemented from the side close to the center point. Considering that even if the virtual field pile is synthesized by multiple physical field piles, the number of field bridges will not be large, this method can basically avoid invalid supplementation.
[0031] Taking into account the real-time nature of field bridge operations, when new instructions are added, completed instructions and instructions in progress are removed to update the instruction sample set, the center points of each cluster are recalculated, and steps S4-S6 are repeated until a new operation instruction set for each field bridge is obtained.
[0032] Each S7 crane selects instructions from each operation instruction set based on the optimal principle to form an operation plan for the crane.
[0033] In this embodiment, two optimal principles are given: the principle of minimum moving distance of the field bridge and the principle of minimum operation time of the field bridge. The former can be obtained according to the minimum distance algorithm based on the current bay position of the field bridge and the bay position of the operation instruction. The latter requires obtaining the expected operation time of each operation instruction and making a comprehensive judgment based on the total moving distance of the field bridge. There are many solutions to this method in the prior art.
[0034] The above provides a complete method for dynamically dividing the field bridge operation area based on the K-means clustering algorithm. The present invention aims to pre-divide the operation instructions, minimize the amount of calculation required for field bridge operation planning, and improve the overall operation efficiency. The present invention solidifies the traditional manual experience, and pre-divides the instruction set according to the changes in the yard instructions through the K-means clustering algorithm, combined with relevant operation factors. After the division, the instruction set divided by each field bridge is assigned an operation plan. Compared with the overall plan in the prior art, the amount of calculation is greatly reduced and the operation of the salesperson is simplified. The present invention plans the optimal operation area under multi-task conditions, pushes the optimal operation task in combination with the idle state of the machinery, avoids falling into the "blind" shortest path misunderstanding, and balances the automated field bridge operation distribution, so that the operation efficiency of each bridge in the horizontal channel is at a higher level.
[0035] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
Claims
1. A method for dynamically dividing the field bridge operation area based on K-means clustering algorithm, Features , including the following steps: S1 Obtaining the yard pile information; the yard pile information includes the yard pile condition, the yard bridge information and the operation instruction information; the yard pile condition includes the bay position information of the yard pile; the yard bridge information includes the number of the yard bridges, the location of the yard bridges and the operation range of the yard bridges; the operation instruction information includes the instruction type, the instruction start position and the instruction end position; S2 takes the operation instruction as a sample, selects one of the instruction start position and the instruction end position as the sample coordinate of the operation instruction according to the instruction class table of the operation instruction, and obtains a cluster sample set of the operation instruction; S3: Take the number of field bridges as the K value of K-means clustering, the current field bridge position as the initial clustering center, the clustering sample set of the operation instruction as the clustering target, and the distance between the sample coordinates and the field bridge position as the clustering basis to perform initial clustering and obtain K clusters; after clustering, verify the validity of the samples in each cluster, extract and mark the invalid samples, and re-cluster the point; S4 recalculates the center points of the K clusters and performs iterative clustering. During the iteration, the marked sample points are selectively clustered. After the iterative clustering is completed, the validity of the samples in each cluster is verified, the invalid samples are extracted and marked, and the point is re-clustered; S5 repeats step S4 until the iteration is completed or the number of iterations is reached; S6: Perform a balance adjustment on the K clusters finally obtained to obtain the operation instruction set of each field bridge; Each S7 crane selects instructions from each operation instruction set based on the optimal principle to form an operation plan for the crane.
2. According to a method for dynamically dividing field bridge operation areas based on K-means clustering algorithm as shown in claim 1, Features: The instruction categories of the operation instructions in steps S1 and S2 include packing instructions and unloading instructions. When the instruction category is a packing instruction, the sample coordinates of the operation instruction are the instruction starting position; when the instruction category is an unloading instruction, the sample coordinates of the operation instruction are the instruction ending position.
3. According to the method for dynamically dividing the field bridge operation area based on the K-means clustering algorithm as shown in claim 1, Features: The validity of the samples within the cluster in step S3 means that the sample coordinates of the instructions within the cluster are within the operating range of the field bridge corresponding to the cluster.
4. According to the method for dynamically dividing the field bridge operation area based on the K-means clustering algorithm as shown in claim 1, Features: In step S4, the method of extracting invalid samples and re-clustering the points is as follows: the distance between the marked sample points and the cluster center points corresponding to their marks is not calculated, and clustering is only performed on the remaining clusters; any sample point may have more than one mark.
5. According to the method for dynamically dividing the field bridge operation area based on the K-means clustering algorithm as shown in claim 1, Features: The iteration completion in step S5 means that after any two consecutive iterations, the positions of the center points of each cluster remain unchanged and there are no new sample points with labels.
6. According to a method for dynamically dividing field bridge operation areas based on K-means clustering algorithm as shown in claim 1, Features: The method for adjusting the balance of the finally obtained K clusters in step S6 is: Set a minimum number of instructions for each cluster, take any end of the field stack as the starting point, and query the number of instructions in the corresponding cluster of each field bridge in turn. When there is a cluster with less than the minimum number of instructions, select valid sample points from the adjacent clusters on both sides to supplement it until the number of samples in all clusters is greater than the minimum number of instructions.
7. According to the method for dynamically dividing the field bridge operation area based on the K-means clustering algorithm as shown in claim 6, Features: When there are multiple clusters that need to be supplemented, the direction of sample supplementation for each cluster is determined with the largest cluster as the center point.
8. According to the method for dynamically dividing the field bridge operation area based on the K-means clustering algorithm as shown in claim 1, Features: In step S7, each field crane selects instructions in each operation instruction set based on the optimal principle to form an operation plan of the field crane as follows: With the goal of minimizing the moving distance of the field crane or minimizing the field crane operation time, instructions in several operation instruction sets are selected in sequence to form an operation plan for the field crane.