Trailer task allocation method and device, equipment, storage medium and program product
By determining the tow truck set and to allocate tasks for tasks to be executed in the port terminal, and combining tasks based on balanced targets, the problem of low tow truck resource utilization caused by manual allocation is solved, and the balanced allocation of tow truck tasks and efficient utilization of resources is achieved. .
Patent Information
- Application Number
- CN202411100453.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-12
- Publication Date
- 2024-11-29
AI Technical Summary
In the prior art, the allocation of tow truck tasks relies on manual judgment, resulting in low utilization of tow truck resources, which is limited by factors such as real-time information and accuracy of judgment.
By determining the set of trailer sets and tasks to be assigned to the task, setting balance goals, and combining tasks based on the balance goals, forming a task group, and each trailer allocates a unique corresponding task group to ensure task load balancing and avoid overloading or Idle.
The overall utilization rate of tow truck resources is improved, resource waste and additional costs caused by uneven task allocation are reduced, and the reasonable allocation of tow truck tasks is achieved.
Smart Images

Figure CN119047756A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of resource scheduling, and in particular to a method, device, equipment, storage medium and program product for allocating trailer tasks. Background Art
[0002] The environment faced by port terminal development is complex and changeable. Port resource scheduling, as the core of port enterprise production, is a very important link in the terminal task organization and arrangement process. In the task process of loading and unloading scheduling, the scheduling of trailers is of paramount importance.
[0003] In the prior art, when allocating trailer tasks, manual judgment of the trailer idle status is relied upon to perform task allocation. Although this method guarantees the operation of the work process to a certain extent, manual scheduling is limited by multiple factors such as information real-time, judgment accuracy, and experience reliance, resulting in low trailer resource utilization. Summary of the invention
[0004] The main purpose of this application is to provide a trailer task allocation method, device, equipment, storage medium and program product, aiming to solve the technical problem of low trailer resource utilization in existing trailer task allocation schemes.
[0005] To achieve the above objectives, the present application provides a method for allocating trailer tasks, the method comprising:
[0006] Determine a set of trailers to be executed and a set of tasks to be assigned;
[0007] Determining a balance target for trailer task allocation, and combining tasks in the task set based on the balance target to obtain a plurality of task groups, each of which includes at least one task;
[0008] A unique corresponding task group is assigned to each trailer in the trailer set, wherein the task group to which all trailers in the trailer set are assigned covers all tasks in the task set and each task is uniquely assigned to a task group.
[0009] In one embodiment, the step of combining the tasks in the task set based on the balancing target to obtain a plurality of task groups includes:
[0010] Determining the balancing dimensions involved in the balancing objective;
[0011] Obtaining task information corresponding to each task in the task set;
[0012] Based on the task information corresponding to each of the tasks and the total number of trailers included in the trailer set, calculating the average task load value assigned to each of the trailers in the trailer set under the balance dimension;
[0013] Tasks are selected from the task set and combined to obtain a plurality of task groups, wherein the absolute value of the difference between the group task load value assigned to each task group under the balance dimension and the average task load value is within a preset error range, and the group task load value is determined based on the task information corresponding to each task in the task group.
[0014] In one embodiment, the step of calculating the average task load value assigned to each trailer in the trailer set under the balance dimension based on the task information corresponding to each task and the total number of trailers included in the trailer set includes:
[0015] In the case where the balance dimension is a time balance dimension, extracting a starting point position and a destination point position corresponding to the task from the task information;
[0016] Estimate the execution time of each task based on the starting point position and the destination point position corresponding to each task, to obtain the estimated execution time of each task;
[0017] Calculate the total estimated execution time of all tasks in the task set to obtain the total estimated execution time;
[0018] Calculate the ratio of the total estimated execution time to the total number of trailers, and determine the average task time assigned to each trailer based on the calculated ratio, where the average task time is the average task load value assigned to each trailer in the trailer set under the time balance dimension.
[0019] In one embodiment, the step of calculating the average task load value assigned to each trailer in the trailer set under the balance dimension based on the task information corresponding to each task and the total number of trailers included in the trailer set includes:
[0020] In the case where the balance dimension is a distance balance dimension, extracting a starting point position and a destination point position corresponding to the task from the task information;
[0021] Calculate the task driving distance based on the starting point position and the destination point position corresponding to each task, and obtain the task driving distance corresponding to each task;
[0022] The average task distance assigned to each trailer is calculated based on the total number of trailers and the task driving distance corresponding to each task in the task set. The average task distance is the average task load value assigned to each trailer in the trailer set under the distance balance dimension.
[0023] In one embodiment, the step of selecting tasks from the task set and combining them to obtain a plurality of the task groups comprises:
[0024] Extracting the starting point location and the destination point location contained in the task information;
[0025] Tasks are selected from the task set and combined to obtain a plurality of the task groups, wherein the destination position of the previous task and the starting point position of the next task in two adjacent tasks in the task group are the same.
[0026] In one embodiment, the step of assigning a unique corresponding task group to each trailer in the trailer set, wherein the task group to which all trailers in the trailer set are assigned covers all tasks in the task set and each task is uniquely assigned to a task group comprises:
[0027] Obtaining constraints and optimization objectives for trailer task allocation, wherein the constraints include that the task group to which all trailers in the trailer set are allocated covers all tasks in the task set and each task is uniquely allocated to a task group;
[0028] Based on the optimization objective and the constraint conditions, a unique corresponding task group is selected for each trailer from a plurality of task groups.
[0029] In addition, to achieve the above-mentioned purpose, the present application also provides a trailer task allocation device, the trailer task allocation device comprising:
[0030] A trailer task determination module, used to determine a trailer set of tasks to be performed and a task set to be assigned;
[0031] A task combination module, used to determine a balance target for trailer task allocation, and combine the tasks in the task set based on the balance target to obtain a plurality of task groups, each of which includes at least one task;
[0032] An allocation module is used to allocate a unique corresponding task group to each trailer in the trailer set, wherein the task group to which all trailers in the trailer set are allocated covers all tasks in the task set and each of the tasks is uniquely allocated to a task group.
[0033] In addition, to achieve the above-mentioned purpose, the present application also provides a trailer task allocation device, which includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, and the computer program is configured to implement the steps of the trailer task allocation method as described above.
[0034] In addition, to achieve the above-mentioned purpose, the present application also provides a storage medium, which is a computer-readable storage medium, and a program for implementing the trailer task allocation method is stored on the computer-readable storage medium. The program for implementing the task allocation method is executed by a processor to implement the steps of the trailer task allocation method as described above.
[0035] In addition, to achieve the above-mentioned purpose, the present application also provides a computer program product, wherein the computer program product includes a computer program, and the computer program is executed by a processor to implement the steps of the trailer task allocation method as described above.
[0036] The trailer task allocation method, device, equipment, storage medium and program product provided by the present application determine a trailer set of tasks to be executed and a task set to be allocated, as well as determine a balance target for trailer task allocation, and combine the tasks in the task set based on the balance target to obtain multiple task groups, each task group containing at least one task. By combining trailer tasks based on the balance target, the task loads allocated to each trailer can be relatively balanced, avoiding the situation where some trailers are overloaded while other trailers are idle. Then, a unique corresponding task group is allocated to each trailer in the trailer set, wherein the task group to which all trailers in the trailer set are allocated covers all tasks in the task set and each task is uniquely allocated to a task group. Through this allocation method, all trailers are reasonably allocated tasks, which can reduce resource waste or increase in additional costs caused by uneven task allocation, thereby improving the overall utilization of trailer resources. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0038] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0039] Figure 1 A flowchart diagram of an embodiment of the method for allocating trailer tasks in this application;
[0040] Figure 2 It is a structural diagram of the hardware environment involved in the trailer task allocation method in the embodiment of the present application.
[0041] The purpose, features and advantages of this application will be further described in conjunction with the embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0042] It should be understood that the specific embodiments described herein are only used to explain the technical solutions of the present application and are not used to limit the present application.
[0043] In order to better understand the technical solution of the present application, a detailed description will be given below in conjunction with the accompanying drawings and specific implementation methods.
[0044] The main solution of the present application is: determine a set of trailers for tasks to be performed and a set of tasks to be assigned; determine a balancing target for trailer task assignment, and combine the tasks in the task set based on the balancing target to obtain multiple task groups, each task group containing at least one task; assign a unique corresponding task group to each trailer in the trailer set, wherein the task groups to which all trailers in the trailer set are assigned cover all tasks in the task set and each task is uniquely assigned to a task group.
[0045] At present, when allocating trailer tasks, we rely on manual judgment of the trailer idle status and perform task allocation. Since manual scheduling is limited by multiple factors such as information real-time, judgment accuracy and experience reliance, the utilization rate of trailer resources is low.
[0046] The present application can achieve balanced distribution of trailer tasks by combining tasks based on a balance target and then allocating the combined tasks to specific trailers, thereby enabling the resources of each trailer to be reasonably utilized.
[0047] It should be noted that the execution subject of this embodiment may be a trailer task allocation device, or a computing service device with data processing, network communication and program running functions, such as a tablet computer, a personal computer, a mobile phone, etc., or a trailer task allocation device capable of realizing the above functions, etc., and this embodiment does not specifically limit this. The following embodiments are described below by taking the trailer task allocation device as the execution subject.
[0048] Based on this, this application proposes a first embodiment of the trailer task allocation method, please refer to Figure 1 The trailer task allocation method of this embodiment includes steps S10 to S30:
[0049] Step S10, determining a set of trailers to be executed and a set of tasks to be assigned.
[0050] In this embodiment, the trailer task allocation device (hereinafter referred to as the device) can obtain multiple trailers that are idle at the target time point, so as to determine the set of trailers for the task to be performed. Specifically, the trailers that are idle at the target time point may include trailers that have completed the task at the current time (the current time is before the target time point) and have not yet received a new task, and trailers that are about to become idle within a preset time period after the current time. Among them, for the trailer that is about to become idle, the device will calculate the estimated completion time of the current task of the trailer. If the estimated completion time is less than the sum of the current time and the preset time for dispatching the vehicle in advance, it is determined that the trailer is about to be idle and it is included in the set of trailers for the task to be performed. Among them, the preset time for dispatching the vehicle in advance is a preset threshold value, which can be set according to actual conditions or experience.
[0051] For the set of tasks to be assigned, the device can collect the tasks to be executed at the target time point and its subsequent time period (quay crane operation plan) from various work points, sort them by time, and add the collected tasks to the task set. Among them, the tasks can exist in the form of operation instructions, and each task describes the specific operation content of the trailer (starting position and key position). For example, for unloading operations, the trailer's operation content is to load containers from one location (on-board location) and then unload them to another location (yard location).
[0052] Specifically, when collecting tasks to be performed at each work point, the device can select a certain number of tasks for preliminary evaluation. The upper limit of the selected tasks is determined by Max(2*WP_Upper_Bound, WP_Selected_Jobs), where WP_Upper_Bound is the upper limit of the task saturation of the work point within a unit time (for example, one day), and WP_Selected_Jobs is the maximum number of tasks selected from the work point for calculation. If the number of remaining tasks of the current work point after the target time point is less than Max(2*WP_Upper_Bound, WP_Selected_Jobs), all remaining tasks are selected as tasks to be performed and added to the task set. In some cases, if a mechanical shutdown setting exists at a certain work point, it is also necessary to obtain tasks after the estimated start time point as tasks to be performed and add them to the task set. The estimated start time point needs to be determined by comprehensively considering the advance dispatch time of the loading and unloading ship (a preset threshold value used to ensure that the trailer has enough time to move from the current position to the loading and unloading point) and the advance dispatch time of the yard container transfer start (another preset threshold value used for advance preparation of the yard operation). Both time thresholds are set based on actual conditions or experience to ensure the effectiveness and timeliness of task allocation.
[0053] Through the above steps, the equipment can accurately determine the set of trailers that can be used to perform tasks in the current and future period, as well as the specific set of tasks that these trailers need to perform, providing basic data support for subsequent task allocation optimization.
[0054] Step S20, determining a balance target for trailer task allocation, and combining tasks in the task set based on the balance target to obtain a plurality of task groups, each of which includes at least one task.
[0055] In this embodiment, the balancing goal may include maintaining a relative balance in the task load of each trailer when performing a task. The balance of any task load may be measured by a specific balance dimension or multiple balance dimensions, including but not limited to the balance of task execution time, the balance of the number of assigned tasks, and the balance of task driving distance. The specific balance dimension to be used can be flexibly set according to the actual operating scenario, resource conditions, and efficiency requirements.
[0056] When combining tasks, the device first evaluates the task information of each task in the task set, including the starting point and destination locations of the task and the weight of the loaded and unloaded goods. Then, based on the balance target, the device can select multiple tasks from the task set for combination to obtain multiple task groups. The generated task groups need to meet the following conditions: among the task groups, the task loads under the balance dimension indicated by the balance target (such as execution time, number of tasks, or task driving distance) can be kept relatively close, so that the task loads of each trailer can be balanced.
[0057] The multiple task groups generated above may contain the same tasks. For example, assuming that after the above step S10, 2 trailers (T1, T2) and 5 tasks are obtained, the balance dimension indicated by the balance target is the task quantity balance dimension, and assuming that task groups G1, G2, and G3 are generated accordingly, task group G1 includes task 1, task 2, and task 3, and task group G2 includes task 2 and task 4, then there is a common task between task group G1 and task group G2, namely, task 2.
[0058] Step S30, assigning a unique corresponding task group to each trailer in the trailer set, wherein the task groups assigned to all trailers in the trailer set cover all tasks in the task set and each task is uniquely assigned to a task group.
[0059] In this embodiment, the device can respond to the optimization goal and constraint conditions of the trailer task assignment input by the user, and then select a unique corresponding task group for each trailer based on the optimization goal and constraint conditions, wherein the constraint conditions may include that the task group to which all trailers in the trailer set are assigned covers all tasks in the task set and each task is uniquely assigned to a task group. The optimization goal may be to minimize the overall execution time of all trailers to complete all tasks, or to minimize the total driving distance of all trailers in the process of executing all tasks, which is specifically set according to the needs.
[0060] This embodiment uses the above scheme to determine a trailer set of tasks to be executed and a task set to be assigned, as well as a balancing target for trailer task assignment, and combines the tasks in the task set based on the balancing target to obtain multiple task groups, each of which contains at least one task. By combining trailer tasks based on the balancing target, the task loads assigned to each trailer can be relatively balanced, avoiding the situation where some trailers are overloaded while other trailers are idle. Then, a unique corresponding task group is assigned to each trailer in the trailer set, wherein the task groups to which all trailers in the trailer set are assigned cover all tasks in the task set and each task is uniquely assigned to a task group. Through this allocation method, all trailers are reasonably assigned tasks, which can reduce resource waste or additional cost increase caused by uneven task allocation, thereby improving the overall utilization of trailer resources.
[0061] Based on the above implementation scheme, in a feasible implementation scheme, the above step S20 may include steps S201 to S204:
[0062] Step S201, determining the balancing dimensions involved in the balancing target.
[0063] In this embodiment, the device can present a visual interface, which displays a balance target selection control, which displays multiple predefined balance target options in a list form. Each balance target option is uniquely associated with a balance dimension, such as time balance, distance balance, or task quantity balance. The device can identify and determine the balance target selected by the user in response to the user's selection operation (such as clicking) on the control, and automatically parse out the balance dimension corresponding to the balance target. In this way, the balance benchmark based on which the subsequent task allocation is based can be clearly determined.
[0064] Step S202: Obtain task information corresponding to each task in the task set.
[0065] Specifically, the task information may include the starting point location and the ending point location corresponding to the task.
[0066] Step S203, based on the task information corresponding to each task and the total number of trailers included in the trailer set, calculate the average task load value assigned to each trailer in the trailer set under the balance dimension.
[0067] Based on the task information of each task, the device can calculate the single task load value corresponding to each task under the balanced dimension. Then, the single task load values of all tasks are added together to obtain the total task load value of all trailers completing all tasks under the balanced dimension. Next, the device obtains the total number of trailers in the trailer set and divides the total task load value by the total number of trailers to calculate the average task load value assigned to each trailer under the balanced dimension. This process ensures that the calculation of the average task load value is based on the overall situation of all tasks to be assigned and trailer resources, providing a key reference for subsequent task combination and allocation.
[0068] Specifically, when the balancing dimension is the time balancing dimension, the single task load value of each task is defined as the estimated execution time of the task, and the average task load value is defined as the average task time assigned to each trailer. When the balancing dimension is the distance balancing dimension, the single task load value is defined as the task driving distance of the corresponding task, and the average task load value is defined as the average task distance assigned to each trailer when the task driving distances of all tasks are evenly distributed. When the balancing dimension is the task quantity balancing, since the task quantity itself is a quantitative indicator, the single task load value of each task is set to a constant of 1 (representing one task unit), and the average task load value is defined as the average number of tasks assigned to each trailer.
[0069] Step S204, select tasks from the task set and combine them to obtain multiple task groups, the absolute value of the difference between the group task load value assigned to each task group under the balance dimension and the average task load value is within a preset error range, and the group task load value is determined based on the task information corresponding to each task in the task group.
[0070] Specifically, the device can extract the starting point position and the destination point position contained in the task information, and then select tasks from the task set according to the spatial continuity rule of the tasks to combine them, so as to obtain multiple task groups. The destination point position of the previous task and the starting point position of the next task in the task group are the same. At the same time, the absolute value of the difference between the group task load value and the average task load value of each task group in the balance dimension is within a preset error range.
[0071] Specifically, after calculating the single task load assigned to each task under the balance dimension based on the task information of each task, the device calculates the sum of the single task load values of all tasks in the corresponding task group to obtain the group task load value.
[0072] More specifically, when the balancing dimension is the time balancing dimension, the group task load value is the sum of the execution time of all tasks in the corresponding task group. In the process of combining tasks, the device can randomly combine multiple tasks and calculate the sum of the execution time of the combined multiple tasks. If the absolute value of the difference between the sum of the execution time of the combined multiple tasks and the average task time is less than the preset time threshold, it is determined that the absolute value of the difference between the group task load value and the average task load value of the current combined multiple tasks under the time balancing dimension is within the preset error range. When the absolute value of the difference between the group task load value and the average task load value of the current combined multiple tasks under the time balancing dimension is within the preset error range, the device combines the current multiple tasks to obtain a task group. If the absolute value of the difference between the sum of the single load values of the combined multiple tasks and the average task time is greater than or equal to the preset time threshold, it is determined that the absolute value of the difference between the group task load value and the average task load value of the task group under the time balancing dimension is not within the preset error range, and the current combined multiple tasks do not meet the balancing target.
[0073] When the balancing dimension is the distance balancing dimension, the group task load value is the sum of the task driving distances of all tasks in the corresponding task group. At this time, in the process of combining multiple tasks, the device first randomly selects multiple tasks to be combined, and then calculates the sum of the task driving distances of the multiple tasks to be combined. If the absolute value of the difference between the sum of the task driving distances of the multiple tasks to be combined and the average task distance is less than the preset distance threshold, it is determined that the absolute value of the difference between the group task load value and the average task load value of the multiple tasks currently combined under the distance balancing dimension is within the preset error range. At this time, the device can combine the current multiple tasks according to the spatial continuity rule of the tasks to obtain a task group. If the absolute value of the difference between the sum of the task driving distances of the multiple tasks to be combined and the average task distance is greater than or equal to the preset distance threshold, it is determined that the absolute value of the difference between the group task load value and the average task load value of the multiple tasks currently combined under the distance balancing dimension is not within the preset error range, and the multiple tasks currently combined do not meet the balancing target.
[0074] In the above scheme, by calculating the average task load value of each trailer in the trailer set under the balance dimension and combining tasks to form a task group based on this, the workload of each trailer can be balanced, avoiding the situation where some trailers are overloaded while other trailers are idle, thereby improving the overall utilization of trailer resources.
[0075] In order to better understand the average task load assigned to each trailer under different balancing dimensions when allocating trailer tasks in an embodiment of the present application, a specific implementation scheme for calculating the average task load value assigned to each trailer based on different balancing dimensions is provided below.
[0076] In one implementation, the balancing dimension is a time balancing dimension, and the above step S203 may include steps S2031 to S2034:
[0077] S2031, extracting the starting point position and the destination point position corresponding to the task from the task information.
[0078] Specifically, the task information corresponding to each task includes the starting point location information and the destination point location information, and the device can directly extract the starting point location and the destination point location corresponding to each task from the task information corresponding to each task.
[0079] S2032, estimating the execution time of each task based on the starting point position and the destination point position corresponding to each task, to obtain the estimated execution time of each task.
[0080] Specifically, the device can combine the starting point position and the destination point position corresponding to each task, and the combination can be in the form of (starting point position, destination point position). Then, the combined starting point position and destination point position are input into a pre-trained machine learning model for prediction to obtain the estimated execution time of the task. Among them, the machine learning model can be a deep neural network, and the deep neural network can be designed using a convolutional neural network, a normalization layer, and a fully connected network layer. When training the machine learning model, multiple historical tasks can be obtained, and the starting point position and destination point position corresponding to each historical task are obtained as sample features of the training samples, and the actual execution time corresponding to the corresponding historical tasks is used as the sample label of the training sample, and then the training sample containing the sample features and sample labels is input into the machine learning model for training to obtain a trained machine learning model.
[0081] S2033, calculating the sum of the estimated execution times of all tasks in the task set to obtain the sum of the estimated execution times.
[0082] For example, suppose the task set includes Task 1, Task 2, and Task 3, and the estimated execution times of Task 1, Task 2, and Task 3 are T1, T2, and T3, respectively. Then the total estimated execution time is
[0083] =T1+T2+T3.
[0084] S2034, calculate the ratio of the total estimated execution time to the total number of trailers, and determine the average task time assigned to each trailer based on the calculated ratio. The average task time is the average task load value assigned to each trailer in the trailer set under the time balance dimension.
[0085] After calculating the total estimated execution time, the device calculates the ratio of the total estimated execution time to the total number of trailers, and uses the calculated ratio as the average task time assigned to each trailer. The average task time is the average task load value assigned to each trailer in the trailer set under the time balance dimension.
[0086] In another implementation, the balancing dimension is a distance balancing dimension, and the above step S203 may include steps S2031" to S2033":
[0087] S2031: Extract the starting point and destination point corresponding to the task from the task information.
[0088] Specifically, the implementation principle of step S2031 is consistent with the implementation principle of the above-mentioned step 2031, and will not be repeated here.
[0089] S2032: Calculate the task driving distance based on the starting point position and the destination point position corresponding to each task, and obtain the task driving distance corresponding to each task.
[0090] For each task, when the starting point and the destination point are expressed in longitude and latitude, the Haversine formula can be used to calculate the distance on the earth's surface from the starting point to the destination point, and the calculated distance on the earth's surface is the task driving distance corresponding to the task. When the starting point and the destination point are expressed in two-dimensional coordinates, the Euclidean distance formula can be used to calculate the distance from the starting point to the destination point, and the calculated distance is the task driving distance corresponding to the task.
[0091] S2033. Calculate the average task distance assigned to each trailer based on the total number of trailers and the task driving distance corresponding to each task in the task set. The average task distance is the average task load value assigned to each trailer in the trailer set under the distance balance dimension.
[0092] The device can calculate the sum of the task driving distances of all tasks included in the task set, and calculate the ratio of the sum of the task driving distances to the total number of trailers, and use the calculated ratio as the average task distance assigned to each trailer. The average task distance is the average task load value assigned to each trailer in the trailer set under the distance balance dimension.
[0093] In another embodiment, when the balancing dimension is the task quantity balancing dimension, the device can calculate the ratio of the total number of tasks contained in the task set to the total number of trailers, and round down the calculated ratio to obtain the average number of tasks assigned to each trailer, and the average number of tasks is the average task load value assigned to each trailer under the task quantity balancing dimension.
[0094] In a feasible implementation manner, the above step S30 may include steps S301 to S302:
[0095] S301, obtaining constraints and optimization objectives for trailer task allocation, wherein the constraints include that the task group to which all trailers in the trailer set are allocated covers all tasks in the task set and each task is uniquely allocated to a task group.
[0096] Specifically, the optimization goal may be to minimize the total execution time of all trailers to complete all tasks, or to minimize the total driving distance of all trailers in the process of executing all tasks. The constraints and optimization goals may be set by default. Alternatively, the device may present a visualization interface, which displays an optimization goal selection control, which displays multiple predefined optimization goal options in a list form for the user to select the optimization goal. The device may identify and determine the optimization goal selected by the user in response to a selection operation (e.g., click) performed by the user on the control.
[0097] S302, based on the optimization objective and the constraint conditions, select a unique corresponding task group for each trailer from the multiple task groups.
[0098] Specifically, the device may use a preset optimization algorithm (such as a genetic algorithm) to implement the allocation of the trailer task group.
[0099] As an example, the social cognitive optimization algorithm is used as an example to describe the process of solving the assignment result of the task group.
[0100] First, the device can set the objective function f(x) corresponding to the optimization goal and define the decision variables PT involved in the task allocation process. i,j , when PT i,j =1 indicates that the i-th trailer is assigned to the j-th task group. i,j =0 means that the i-th trailer is assigned to the j-th task group.
[0101] Then, the initial PT is generated in multiple task groups that meet the constraints. i,j Matrix, PT i,j The matrix contains a number of elements equal to the total number of trailers and is based on the initial PT i,j Matrix calculation of the initial target value f(0).
[0102] After that, in each iteration, the task group assigned to each trailer is updated based on the following formula, that is, the decision variable PT i,j To update:
[0103]
[0104] Among them, c1 is the cognitive constant, which represents self-cognition, and its value can be set according to actual conditions. c2 is the social constant, which represents the interaction between individuals and society, and its value can be set according to actual conditions. Represent the weights of self-cognition and individual-society interaction, It obeys normal distribution and its value range is [0, 1]. is the target value obtained at the kth iteration, is the optimized value of the previous k iterations, are the decision variables PT in the kth iteration and the k+1th iteration respectively. i,j The value of , α is a preset value, are the moving speeds of individuals in the kth iteration and the k+1th iteration respectively.
[0105] The new target value corresponding to each iteration is calculated until a preset iteration stop condition is met. The preset iteration stop condition may be that the absolute value of the difference between two adjacent target values is less than a preset range, or the number of iterations reaches a set maximum number of iterations.
[0106] In the above scheme, optimizing task allocation helps to achieve optimal configuration of trailer and task resources, thereby ensuring that trailer resources are fully utilized.
[0107] The embodiment of the present application further provides a trailer task allocation device, the trailer task allocation device comprising:
[0108] A trailer task determination module, used to determine a trailer set of tasks to be performed and a task set to be assigned;
[0109] A task combination module is used to determine a balanced target for trailer task allocation, and to combine tasks in a task set based on the balanced target to obtain multiple task groups, each of which contains at least one task;
[0110] The allocation module is used to allocate a unique corresponding task group to each trailer in the trailer set, wherein the task group to which all trailers in the trailer set are allocated covers all tasks in the task set and each task is uniquely allocated to a task group.
[0111] Optionally, the task combination module includes:
[0112] A determination unit, used for determining the equilibrium dimension involved in the equilibrium target;
[0113] An acquisition unit, used to acquire task information corresponding to each task in the task set;
[0114] an average load calculation unit, used to calculate an average task load value assigned to each trailer in the trailer set under a balanced dimension based on task information corresponding to each task and the total number of trailers included in the trailer set;
[0115] The allocation unit is used to select tasks from the task set and combine them to obtain multiple task groups. The absolute value of the difference between the group task load value assigned to each task group under the balance dimension and the average task load value is within a preset error range. The group task load value is determined based on the task information corresponding to each task in the task group.
[0116] Optionally, the average load calculation unit is further used for:
[0117] In the case where the balance dimension is the time balance dimension, extracting the starting point position and the destination point position corresponding to the task from the task information;
[0118] The execution time of each task is estimated based on the starting point position and the destination point position corresponding to each task, so as to obtain the estimated execution time of each task;
[0119] Calculate the sum of the estimated execution time of all tasks in the task set to obtain the total estimated execution time;
[0120] Calculate the ratio of the total estimated execution time to the total number of trailers, and determine the average task time assigned to each trailer based on the calculated ratio. The average task time is the average task load value assigned to each trailer in the trailer set under the time balance dimension.
[0121] Optionally, the average load calculation unit is further used for:
[0122] When the balance dimension is a distance balance dimension, extracting the starting point position and the destination point position corresponding to the task from the task information;
[0123] The task driving distance is calculated based on the starting point position and the destination point position corresponding to each task, and the task driving distance corresponding to each task is obtained;
[0124] The average task distance assigned to each trailer is calculated based on the total number of trailers and the task driving distance corresponding to each task in the task set. The average task distance is the average task load value assigned to each trailer in the trailer set under the distance balance dimension.
[0125] Optionally, the task combination module is further used to:
[0126] Extract the starting point location and the destination point location contained in the task information;
[0127] Tasks are selected from the task set and combined to obtain a plurality of task groups, wherein the destination position of the previous task and the starting point position of the next task in the task group are the same.
[0128] Optionally, the allocation module is further used for:
[0129] When obtaining the constraints and optimization objectives of the trailer task assignment, the constraints include that the task groups to which all trailers in the trailer set are assigned cover all tasks in the task set and each task is uniquely assigned to a task group;
[0130] Based on the optimization objectives and constraints, a unique corresponding task group is selected for each trailer from multiple task groups.
[0131] The trailer task allocation device provided in the embodiment of the present application adopts the trailer task allocation method in the above embodiment, which can solve the technical problem of low trailer resource utilization. Compared with the prior art, the beneficial effects of the trailer task allocation device provided in the embodiment of the present application are the same as the beneficial effects of the trailer task allocation method provided in the above embodiment, and other technical features in the trailer task allocation device are the same as the features disclosed in the above embodiment method, which will not be repeated here.
[0132] The present application provides a trailer task allocation device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the trailer task allocation method in the above-mentioned embodiment one.
[0133] Reference below Figure 2 , which shows a schematic diagram of the structure of a trailer task allocation device suitable for implementing the embodiment of the present application. The trailer task allocation device in the embodiment of the present application may include but is not limited to mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Descriptions), PMPs (Portable Media Players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 2 The trailer task allocation device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.
[0134] like Figure 2 As shown, the trailer task allocation device may include a processing device 1001 (e.g., a central processing unit, a graphics processor, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM: Read Only Memory) 1002 or a program loaded from a storage device 1003 to a random access memory (RAM: Random Access Memory) 1004. In RAM1004, various programs and data required for the operation of the trailer task allocation device are also stored. The processing device 1001, ROM1002, and RAM1004 are connected to each other through a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Generally, the following systems can be connected to the I / O interface 1006: an input device 1007 including, for example, a touch screen, a touch pad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; an output device 1008 including, for example, a liquid crystal display (LCD: Liquid Crystal Display), a speaker, a vibrator, etc.; a storage device 1003 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 1009. The communication device 1009 can allow the trailer task allocation device to communicate with other devices wirelessly or by wire to exchange data. Although the figure shows a trailer task allocation device with various systems, it should be understood that it is not required to implement or have all the systems shown. More or fewer systems can be implemented or have alternatively.
[0135] In particular, according to the embodiments disclosed in the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present application include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device, or installed from a storage device 1003, or installed from a ROM 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the method of the embodiment disclosed in the present application are executed.
[0136] The trailer task allocation device provided by the present application adopts the trailer task allocation method in the above embodiment, which can solve the technical problem of low trailer resource utilization. Compared with the prior art, the trailer task allocation device provided by the present application has the same beneficial effects as the trailer task allocation method provided by the above embodiment, and other technical features in the trailer task allocation device are the same as the features disclosed in the method of the previous embodiment, which will not be repeated here.
[0137] It should be understood that the various parts disclosed in this application can be implemented by hardware, software, firmware or a combination thereof. In the description of the above embodiments, specific features, structures, materials or characteristics can be combined in any one or more embodiments or examples in a suitable manner.
[0138] The above are only specific implementations of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
[0139] The present application provides a computer-readable storage medium having computer-readable program instructions (ie, computer programs) stored thereon, and the computer-readable program instructions are used to execute the trailer task allocation method in the above-mentioned embodiment.
[0140] The computer-readable storage medium provided in the present application may be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, systems or devices, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, system or device. The program code contained on the computer-readable storage medium may be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination of the above.
[0141] The computer-readable storage medium may be included in the trailer task allocation device; or may exist independently without being assembled into the trailer task allocation device.
[0142] The computer-readable storage medium carries one or more programs. When the one or more programs are executed by the trailer task allocation device, the trailer task allocation device: determines a set of trailers for tasks to be executed and a set of tasks to be allocated; determines a balance target for trailer task allocation, and combines the tasks in the task set based on the balance target to obtain multiple task groups, each task group containing at least one task; allocates a unique corresponding task group to each trailer in the trailer set, wherein the task groups to which all trailers in the trailer set are allocated cover all tasks in the task set and each task is uniquely allocated to a task group.
[0143] Computer program code for performing the operations of the present application may be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0144] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present application. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0145] The modules involved in the embodiments described in this application may be implemented by software or hardware, wherein the name of the module does not constitute a limitation on the unit itself in some cases.
[0146] The readable storage medium provided by the present application is a computer-readable storage medium, which stores computer-readable program instructions (i.e., computer programs) for executing the above-mentioned trailer task allocation method, and can solve the technical problem of not being able to meet the needs of diversified business scenarios. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided by the present application are the same as the beneficial effects of the trailer task allocation method provided by the above-mentioned embodiment, and will not be repeated here.
[0147] An embodiment of the present application also provides a computer program product, including a computer program, which implements the steps of the above-mentioned trailer task allocation method when the computer program is executed by a processor.
[0148] Compared with the prior art, the beneficial effects of the computer program product provided in the embodiment of the present application are the same as the beneficial effects of the trailer task allocation method provided in the above embodiment, and will not be elaborated here.
[0149] The above are only preferred embodiments of the present application, and are not intended to limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent processing scope of the present application.
Claims
1. A method for allocating trailer tasks, characterized in that: The method comprises: Determine a set of trailers to be executed and a set of tasks to be assigned; Determining a balance target for trailer task allocation, and combining tasks in the task set based on the balance target to obtain a plurality of task groups, each of which includes at least one task; A unique corresponding task group is assigned to each trailer in the trailer set, wherein the task group to which all trailers in the trailer set are assigned covers all tasks in the task set and each task is uniquely assigned to a task group.
2. The method according to claim 1, characterized in that The step of combining the tasks in the task set based on the balancing target to obtain a plurality of task groups comprises: Determining the balancing dimensions involved in the balancing objective; Obtaining task information corresponding to each task in the task set; Based on the task information corresponding to each of the tasks and the total number of trailers included in the trailer set, calculating the average task load value assigned to each of the trailers in the trailer set under the balance dimension; Tasks are selected from the task set and combined to obtain a plurality of task groups, wherein the absolute value of the difference between the group task load value assigned to each task group under the balance dimension and the average task load value is within a preset error range, and the group task load value is determined based on the task information corresponding to each task in the task group.
3. The method according to claim 2, characterized in that The step of calculating the average task load value assigned to each trailer in the trailer set under the balance dimension based on the task information corresponding to each task and the total number of trailers included in the trailer set comprises: In the case where the balance dimension is a time balance dimension, extracting a starting point position and a destination point position corresponding to the task from the task information; Estimate the execution time of each task based on the starting point position and the destination point position corresponding to each task, to obtain the estimated execution time of each task; Calculate the total estimated execution time of all tasks in the task set to obtain the total estimated execution time; Calculate the ratio of the total estimated execution time to the total number of trailers, and determine the average task time assigned to each trailer based on the calculated ratio, where the average task time is the average task load value assigned to each trailer in the trailer set under the time balance dimension.
4. The method according to claim 2, characterized in that The step of calculating the average task load value assigned to each trailer in the trailer set under the balance dimension based on the task information corresponding to each task and the total number of trailers included in the trailer set comprises: In the case where the balance dimension is a distance balance dimension, extracting a starting point position and a destination point position corresponding to the task from the task information; Calculate the task driving distance based on the starting point position and the destination point position corresponding to each task, and obtain the task driving distance corresponding to each task; The average task distance assigned to each trailer is calculated based on the total number of trailers and the task driving distance corresponding to each task in the task set. The average task distance is the average task load value assigned to each trailer in the trailer set under the distance balance dimension.
5. The method according to any one of claims 1 to 4, characterized in that: The step of selecting tasks from the task set and combining them to obtain a plurality of the task groups comprises: Extracting the starting point location and the destination point location contained in the task information; Tasks are selected from the task set and combined to obtain a plurality of the task groups, wherein the destination position of the previous task and the starting point position of the next task in two adjacent tasks in the task group are the same.
6. The method according to any one of claims 1 to 4, characterized in that: The step of assigning a unique corresponding task group to each trailer in the trailer set, wherein the task group to which all trailers in the trailer set are assigned covers all tasks in the task set and each task is uniquely assigned to a task group comprises: Obtaining constraints and optimization objectives for trailer task allocation, wherein the constraints include that the task group to which all trailers in the trailer set are allocated covers all tasks in the task set and each task is uniquely allocated to a task group; Based on the optimization objective and the constraint conditions, a unique corresponding task group is selected for each trailer from a plurality of task groups.
7. A trailer task allocation device, characterized in that: The trailer task allocation device comprises: A trailer task determination module, used to determine a trailer set of tasks to be performed and a task set to be assigned; A task combination module, used to determine a balance target for trailer task allocation, and combine the tasks in the task set based on the balance target to obtain a plurality of task groups, each of which includes at least one task; An allocation module is used to allocate a unique corresponding task group to each trailer in the trailer set, wherein the task group to which all trailers in the trailer set are allocated covers all tasks in the task set and each of the tasks is uniquely allocated to a task group.
8. A trailer task allocation device, characterized in that: The trailer task allocation device comprises: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the trailer task allocation method according to any one of claims 1 to 6.
9. A storage medium, characterized in that: The storage medium is a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the trailer task allocation method according to any one of claims 1 to 6 are implemented.
10. A computer program product, characterized in that The computer program product comprises a computer program, and when the computer program is executed by a processor, the steps of the method for allocating tug truck tasks according to any one of claims 1 to 6 are implemented.
