Disclosure of Invention
It is an object of embodiments of the present disclosure to provide technical support for deploying more scientific distribution logic.
According to one aspect of the present disclosure, a delivery decision method is presented, comprising:
constructing a delivery objective function according to a delivery objective and delivery factors influencing the delivery objective;
determining constraints of the objective function according to the distribution capacity;
calculating an optimal solution of the distribution elements of the objective function under the constraint;
and deploying the distribution logic related to the distribution elements according to the optimal solution of the distribution elements.
In some embodiments, the objective function includes a delivery objective, a delivery constant, and a delivery variable to be solved, the delivery constant being determined according to the delivery capability, the delivery variable being determined according to the delivery element.
In some embodiments, calculating the optimal solution for the distribution element comprises: and calculating an optimal solution of the distribution element by using a mixed integer programming solver.
In some embodiments, constructing the objective function includes: an objective function which minimizes the total sorting cost of all sorting nodes is constructed, and whether the distribution route performs sorting processing at the sorting nodes is taken as a distribution variable of the objective function.
In some embodiments, the constraints include:
ensuring that the parcel quantity to be sorted of each sorting node does not exceed the constraint of the sorting capacity of the sorting node;
ensuring that the number of the needed grid openings does not exceed the constraint of the number of the grid openings of the sorting nodes;
for packages of delivery routes, if a package needs to be built from sorting node i to sorting node j, then conditional constraints for the trellis addressed to sorting node j need to be reserved at sorting node i.
In some embodiments, the constraints further include any one or more of the following:
the constraint of sorting packages entering an originating sorting node is guaranteed;
the constraint of sorting packages reaching a target sorting node is ensured;
ensuring whether constraint that a variable of a grid port sent to a sorting node j is 0/1 variable is reserved in the sorting node i or not;
and ensuring that whether the distribution route performs sorting processing at the sorting node is constrained by 0/1 variable.
In some embodiments, if a conditional constraint is included in the constraints, the conditional constraint is converted to a constraint of an integer program.
In some embodiments, deploying the delivery logic associated with the delivery element according to the optimal solution of the delivery element comprises:
according to whether the distribution route is an optimal solution of sorting processing at the sorting nodes, deploying package building distribution logic between adjacent sorting nodes needing sorting processing, if sorting nodes needing no sorting processing exist between adjacent sorting nodes needing sorting processing, deploying package distribution logic at the sorting nodes needing no sorting processing.
In some embodiments, deploying the delivery logic associated with the delivery element according to the optimal solution of the delivery element further comprises:
and searching a sorting node i needing to reserve the lattice ports according to the condition constraint, and reserving the lattice ports sent to the sorting node j at the sorting node i.
According to another aspect of the present disclosure, there is provided a dispensing decision device comprising:
a module for executing the delivery decision method of any of the foregoing embodiments.
According to another aspect of the present disclosure, there is provided a dispensing decision device comprising:
a memory; and
a processor coupled to the memory, the processor configured to execute the delivery decision method of any of the foregoing embodiments based on instructions stored in the memory.
According to another aspect of the present disclosure, a computer readable storage medium is provided, on which a computer program is stored which, when executed by a processor, implements the delivery decision method of any of the foregoing embodiments.
According to the embodiment of the disclosure, the objective function of the delivery is constructed according to the delivery target and the delivery elements influencing the delivery target, the constraint of the objective function is determined according to the delivery capability, the optimal solution of the delivery elements of the objective function under the constraint is calculated, and the delivery logic related to the delivery elements is deployed according to the optimal solution of the delivery elements, so that technical support is provided for scientific decision of the delivery logic.
Detailed Description
The technical solutions in the embodiments of the present disclosure will be clearly and completely described below with reference to the drawings in the embodiments of the present disclosure.
Some terms of the present disclosure are described below.
The delivery node refers to a node passing through in the cargo delivery process, and comprises a cargo receiving bin and a sorting node.
Sorting node refers to a distribution node with sorting capability, also known as a sorting center.
The package establishment means that for packages of the same route, the packages can be concentrated at one sorting node and uniformly sent to another sorting node. The number of the built packets corresponds to the number of the destination sorting nodes, and the number of the packets is required by the number of the destination sorting nodes.
The packet passing means that the built packet may pass through a plurality of transit sorting nodes before reaching the destination sorting node, and for the transit sorting nodes, the built packet does not need to be unpacked and reconstructed, and can be directly sent to the next distribution node of the distribution route.
Unpacking means that unpacking is needed when the built package reaches the destination sorting node. It should be noted that the destination sorting node for the package may be different from the destination sorting node for the package. The same package may undergo multiple processes of wrapping and unwrapping.
The grid openings refer to working openings of sorting nodes, and one or more grid openings are reserved for packages of the same destination in the sorting process and are used for processing packages of corresponding destinations. The package is received by the container under the grid, so that the package is convenient to transport.
The present disclosure proposes a scientific delivery solution implemented with constraint optimization, described in detail below.
Fig. 1 is a flow chart of some embodiments of the disclosed delivery decision method. As shown in FIG. 1, the method of this embodiment includes steps 110-140.
In step 110, an objective function of the delivery is constructed based on the delivery target and the delivery elements affecting the delivery target.
In some embodiments, the objective function generally includes a delivery objective, a delivery constant, and a delivery variable to be solved. The delivery objective is determined based on the delivery decision. For example, if a minimum total sorting cost is desired, an objective function is constructed that minimizes the total sorting cost of all sorting nodes, and if a minimum delivery timeliness is desired, an objective function is constructed that minimizes the delivery timeliness of packages. But are not limited to the examples illustrated. The delivery constant is determined based on the delivery capabilities of the delivery system. The distribution constant may be, for example, sorting capacity of the sorting node, unit sorting cost, etc., but is not limited to the illustrated example. The delivery variable is determined based on the delivery element affecting the delivery target. For example, an objective function is constructed that minimizes the total sorting cost for all sorting nodes, and whether the distribution route is subjected to sorting processing at the sorting nodes is determined as a distribution variable of the objective function.
At step 120, constraints for the objective function are determined based on the delivery capabilities of the delivery system.
Constraints are conditions that must be met when the objective function is established, i.e. the delivery objective needs to be achieved on the basis of the delivery capabilities of the delivery system or under constraints. The constraints may be one or more depending on the traffic needs.
In step 130, an optimal solution for the delivery element of the objective function under constraint is calculated.
In step 140, the distribution logic associated with the distribution element is deployed according to the optimal solution of the distribution element.
In some embodiments, if the objective function and its constraints are a mixed-linear integer programming model, the optimal solution may be calculated using a branch-and-bound algorithm, or a cut-plane method, or the like, or may be calculated using a mixed-integer programming solver. Mixed integer programming solvers include, for example, SCIP (Solving Constraint Integer Programs, solution constraint integer programming), cplex, GLPK (GNU Linear Programming Kit, GNU linear programming toolkit), gurobi, lpcolve, etc.
By constructing a delivery objective function according to a delivery objective and delivery elements influencing the delivery objective, determining the constraint of the objective function according to the delivery capacity, calculating the optimal solution of the delivery elements of the objective function under the constraint, and deploying the delivery logic related to the delivery elements according to the optimal solution of the delivery elements, the technical support is provided for the scientific decision of the delivery logic.
The foregoing delivery decision method is applied below to find a delivery solution that minimizes the total sorting cost of all sorting nodes.
First, input parameters and variables are defined, the input parameters including sets and constants.
Aggregation:
v = set of all delivery nodes (including sorting nodes and receiving bins). The distribution node is simply referred to as a node.
V 0 Set of sorting nodes. Sorting node refers to a distribution node with sorting capability, also known as a sorting center.
K=set of routes.
R k Set of nodes in route k.
Set of nodes subsequent to node i in route k.
Start node of route k.
Termination node of route k.
The routing data of the whole network can be generated by a routing recommendation system, the starting point of the routing is a goods receiving warehouse or sorting nodes of all levels, and the end point is sorting nodes of all levels. There is currently only one route for a given starting sorting node and destination sorting node. For local traffic, the routing data contains only two nodes, namely from the receiving warehouse to the nearest sorting node. For the external port traffic, there are included an originating sorting node, a destination sorting node, and a series of transit sorting nodes. The number of routes depends on the degree of refinement, e.g. if refined to three levels of sorting nodes, it is assumed that there are 90 one, two, three levels of sorting nodes, which may include 90×90=8100 routes at maximum.
Constant:
c i sorting capability of sorting node i. In some embodiments, sorting capability may be determined based on sorting equipment category. For example, the bin has a sorting capacity of 0, the primary and secondary sorting nodes do not set an upper sorting capacity limit, and only the tertiary sorting nodes consider the upper limit. The granularity of the sorting capability is the maximum sorting parcel number under the condition that the sorting node does not stop rotating.
n i The number of lanes available to the external port node is =sorting node i. The number of bins available for a period of time by a sorting node using an automated device is limited. The number of the grid openings can be increased by adding manual modes by using the manually participated sorting nodes. The sorting node sorts the local traffic and the external port traffic simultaneously, and after the number of the grids needed by the local traffic is satisfied, the remaining number of grids can be used for the external port traffic.
s i Unit sort cost of sort node i. In some embodiments, the costs of building, over-packing, and unpacking are different. For the package building process, the package building cost is different for different sorting nodes due to different equipment types, manpower, field sizes and the like. All fromThe motorized sorting equipment differs from the sorting equipment that requires manual intervention in the sorting cost per unit flow. Meanwhile, if the grid is needed to be added, the manual labor is needed to be added to the manually participated sorting equipment.
q k Total wrap amount of route k.
In route k, the set of nodes between node i and node j (excluding node i and node j itself), and in route k, node j is the subsequent node to node i, i.e. +.>
The variables:
x ij a 0-1 variable indicates whether a socket is reserved at node i for node j. Wherein x is ij =1 denotes reserved cell, x ij =0 means no reserved trellis.
A 0-1 variable, indicates whether route k is sorted at node i. Wherein (1)>Indicating that at node i the sorting is performed,indicating that it is not sorted at node i.
Then, a model is built based on the aforementioned input parameters and variables. Modeling mainly considers where each route is sorted and what ports the external port destination corresponds to each sorting node needs to reserve. The problem of optimizing sorting costs can be expressed as the following mathematical expression (1-8).
An objective function minimizing the total sorting cost of all sorting nodes is constructed by using the formula (1), and whether the sorting process is performed on the sorting nodes by the distribution route is taken as a distribution variable.
The objective function (1) is to minimize the total sorting cost of all sorting nodes. The unit sort cost varies for different sort nodes.
The constraints of the objective function (1) are determined using equations (2-8).
Constraint (2) ensures that the amount of parcels to be sorted for each sorting node does not exceed the sorting capacity of that sorting node.
Constraint (3) ensures that the number of bins required for the solution does not exceed the number of bins of the current sorting node.
Constraint (4) ensures sorting of packages entering the originating sorting node.
Constraint (5) ensures sorting of packages arriving at the destination sorting node.
Constraint (6) guarantees variable x ij Is 0/1 variable.
Constraint (7) guarantee variableIs a 0-1 variable.
Constraint (8) is a conditional constraint. The conditional constraint (8) indicates that, for a parcel of delivery route k, if a parcel is built from node i to node j (i.e., there is a need to sort between node i and node j, and there is no need to sort between node i to node j), then there is an indication that there is a need to reserve a trellis bound for node j at node i, i.e., x ij =1。Representing a set of nodes in the distribution route k except for the termination node.
It is now necessary to convert conditional constraint (8) into constraint of integer programming. Consider it to be expressed as a logical operation, denoted by aAnd->Denoted by B->X is represented by C ij =1, then (8) is expressed as: if, then, i.e. A ∈B→C, where ∈A denotes AND (and), the formula is equivalent to ∈A ∈ ->Wherein V.is expressed as or,indicating no->Representing not A->Indicating non-B.
According to the 0/1 variable constraint,can be expressed as-> Can be expressed as->C represents x ij =1。/>When true, the +_f>And c three formulas cannot be all false, and three 0-1 variables z can be created 1 ,z 2 ,z 3 Conditional constraint (8) may be converted to constraints (9) - (13).
By converting the conditional constraint (8), the original constraint optimization problem can be converted to a standard 0/1 integer programming problem, which can then be solved by a mixed integer programming solver (e.g., SCIP). Since the sorting plan of the sorting node is not changed frequently, the solving frequency is not too high, and the solving is usually performed when the route is changed (for example, when the sorting node is increased or decreased).
And deploying the distribution logic according to the optimal solution. According to whether the distribution route is an optimal solution of sorting processing at the sorting nodes, deploying package building distribution logic between adjacent sorting nodes needing sorting processing, if sorting nodes needing no sorting processing exist between adjacent sorting nodes needing sorting processing, deploying package distribution logic at the sorting nodes needing no sorting processing. And searching a sorting node i needing to reserve the lattice ports according to the condition constraint, and reserving the lattice ports sent to the sorting node j at the sorting node i.
Specifically, any one route k, { v 1 →v 2 →…→v m },v 0 Representing a receiving bin, v m To sort nodes for purposes, each node i in the route corresponds to a variable value of whether to sort at that nodeI.e. corresponding ones of the optimal solutionsFor adjacent +.>It is indicated that the delivery route k is to be packetized from node i to node j.
See the optimal solution and distribution logic diagram shown in fig. 2. The distribution route k comprises 5 nodes, and the optimal solution is thatComprises 1, 3, 4, 5, wherein node 1 and node 5 are a start node and a stop node. At node 2, the package corresponding to the route is subjected to packet processing, i.e., not sorted at node 2. Since the inter-node between node 1 and node 3 does not contain other +.>And illustrates the need to build packets from node 1 to node 3. Similarly, the illustration requires a packet to be built from node 3 to node 4 and from node 4 to node 5.
At the same time, for any sorting center i, find all x ij Node j corresponding to=1, and reserving a socket for node j at node i. The cell information of the external port and the local cell information are combined together and can be used as the basis of the sorting plan of the sorting node.
Under the condition that the limit conditions of the number of the grids of the sorting nodes and the sorting capability are met, the method and the device optimize and determine the package building logic of each route in the distribution network and determine the destination information corresponding to the grids of the sorting nodes, so that the total sorting cost is minimum. The capacity of automatic sorting equipment can be fully utilized on the whole, the risk of bin explosion is reduced, and the distribution efficiency is improved.
Fig. 3 is a schematic structural diagram of some embodiments of the dispensing decision device of the present disclosure.
As shown in fig. 3, the delivery decision device includes:
a construction module 310, configured to construct a delivery objective function according to the delivery objective and the delivery element affecting the delivery objective, and determine constraints of the objective function according to the delivery capability;
a calculation module 320, configured to calculate an optimal solution of the distribution element of the objective function under constraint;
a deployment module 330, configured to deploy the delivery logic related to the delivery element according to the optimal solution of the delivery element.
In some embodiments, the objective function includes a delivery objective, a delivery constant, and a delivery variable to be solved. The delivery constant is determined based on the delivery capabilities of the delivery system. The delivery variable is determined based on the delivery element affecting the delivery target.
In some embodiments, computing the optimal solution includes: and calculating an optimal solution by using a mixed integer programming solver.
In some embodiments, constructing the objective function includes: an objective function is constructed that minimizes the total sorting cost of all sorting nodes, and whether the distribution route performs sorting processing at the sorting nodes is taken as a distribution variable of the objective function.
In some embodiments, the constraints include:
ensuring that the parcel quantity to be sorted of each sorting node does not exceed the constraint of the sorting capacity of the sorting node;
ensuring that the number of the needed grid openings does not exceed the constraint of the number of the grid openings of the sorting nodes;
for packages of delivery routes, if a package needs to be built from sorting node i to sorting node j, then conditional constraints for the trellis addressed to sorting node j need to be reserved at sorting node i.
In some embodiments, the constraints further include any one or more of the following:
the constraint of sorting packages entering an originating sorting node is guaranteed;
the constraint of sorting packages reaching a target sorting node is ensured;
ensuring whether constraint that a variable of a grid port sent to a sorting node j is 0/1 variable is reserved in the sorting node i or not;
and ensuring that whether the distribution route performs sorting processing at the sorting node is constrained by 0/1 variable.
In some embodiments, if conditional constraints are included in the constraints, the conditional constraints are converted into constraints of an integer program.
In some embodiments, deploying the distribution logic in accordance with the optimal solution includes: according to whether the distribution route is an optimal solution of sorting processing at the sorting nodes, deploying package building distribution logic between adjacent sorting nodes needing sorting processing, if sorting nodes needing no sorting processing exist between adjacent sorting nodes needing sorting processing, deploying package distribution logic at the sorting nodes needing no sorting processing.
In some embodiments, deploying the distribution logic according to the optimal solution further comprises: and searching a sorting node i needing to reserve the lattice ports according to the condition constraint, and reserving the lattice ports sent to the sorting node j at the sorting node i.
Fig. 4 is a schematic structural view of another embodiment of the dispensing decision device of the present disclosure.
As shown in fig. 4, the delivery decision device includes: a memory 410 and a processor 420 coupled to the memory 410, the processor 420 being configured to execute the delivery decision method of any of the foregoing embodiments based on instructions stored in the memory 410.
The memory 410 may include, for example, system memory, fixed nonvolatile storage media, and the like. The system memory stores, for example, an operating system, application programs, boot Loader (Boot Loader), and other programs.
The delivery decision device may also include an input-output interface 430, a network interface 440, a storage interface 450, and the like. These interfaces 430, 440, 450 and the memory 410 and the processor 420 may be connected, for example, by a bus 460. The input/output interface 430 provides a connection interface for input/output devices such as a display, a mouse, a keyboard, a touch screen, and the like. Network interface 440 provides a connection interface for various networking devices. Storage interface 450 provides a connection interface for external storage devices such as SD cards, U-discs, and the like.
The present disclosure also proposes a computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements the delivery decision method of any of the foregoing embodiments.
It will be appreciated by those skilled in the art that embodiments of the present disclosure may be provided as a method, system, or computer program product. Accordingly, the present disclosure may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present disclosure may take the form of a computer program product embodied on one or more computer-usable non-transitory storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) having computer-usable program code embodied therein.
The present disclosure is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the disclosure. It will be understood that each flowchart and/or block of the flowchart illustrations and/or block diagrams, and combinations of flowcharts and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
The foregoing description of the preferred embodiments of the present disclosure is not intended to limit the disclosure, but rather to enable any modification, equivalent replacement, improvement or the like, which fall within the spirit and principles of the present disclosure.