Mathematical Model and Algorithm for the Task Allocation Problem of Robots in the Smart Warehouse

In the smart warehousing system adopting cargo-to-person mode, all the items are stored in the movable shelves. There are some warehouse robots transporting the shelves to the working platforms for completing order picking or items replenishment tasks. When the number of robots is insufficient, the task allocation problem of robots is an important issue in designing the warehousing system. In this paper, the task allocation problem of insufficient warehouse robots (TAPIR) is investigated. Firstly, the TAPIR problem is decomposed into three sub-problems: task grouping problem, task scheduling problem and task balanced allocation problem. Then three sub-problems are respectively formulated into integer programming models, and the corresponding heuristic algorithms for solving three sub-problems are designed. Finally, the simulation and analysis are done on the real data of online bookstore. Simulation results show that the mathematical models and algorithms of this paper can provide a theoretical basis for solving the TAPIR problem.


Introduction
In the smart warehousing system adopting cargo-to-person mode, all the items are stored in the movable shelves neatly arranged in the warehouse, and picking workers stand in front of stationary picking platforms.There are some isomorphic warehouse robots running along the marked line to complete order picking or items replenishment tasks [1].When starting order picking or items replenishment tasks, the computer system controls one or more warehouse robots to the sites of assigned movable shelves; the warehouse robots lift up their assigned shelves and transport them to the corresponding picking platforms.After the picking workers complete the order picking or items replenishment tasks, the warehouse robots transport the movable shelves back to their own original locations.In the warehousing management system, complex transportation works are done by the warehouse robots instead of human; the working efficiency is improved in some ways [2].
Since different items of one order might be laid in different shelves.When picking an order, the robots usually need to transport more than one shelf to the picking platforms.In another words, the warehouse robots need to complete multiple tasks for picking one order.In order to improve the picking efficiency, it needs the multirobot cooperation to complete multiple tasks.The task allocation problem of warehouse robots greatly affects the working efficiency of smart warehousing system.Some researchers investigated the tasks allocation problem of abundant robots (TAPAR) where the number of robots was larger than the number of tasks to be completed in picking one order.Guo adopts the market auction method to solve the task allocation problem of abundant mobile robots (TAPAR) in a smart logistic centre [3].Li uses the genetic algorithm and ant colony algorithm to study the TAPAR problem [4].Christopher et al. propose the resource allocation problem of multi-vehicle system in the smart warehouse by using Alphabet Soup method [5].And Li designs the heuristic algorithm for solving the TAPAR problem [6].
In practical, the number of robots is often smaller than the number of tasks to be completed in picking one order, which means the robots are insufficient.By now, little researches focused on the task allocation problem of insufficient mobile robots (TAPIR).
In this paper, the TAPIR problem in smart warehousing system based on cargo-to-person mode is investigated.We partition the task allocation problem of insufficient robots into three sub-problems: task grouping problem, task scheduling problem and task balanced allocation problem.The mathematical models of three sub-problems are built, and the corresponding heuristic algorithms are designed to solve three sub-problems.Finally, the simulation and analysis are done on the real data of online bookstore S.

Problem Description
In a smart warehousing system based on cargo-to-person mode, there are m available warehouse robots, k movable shelves, and n picking platforms.Each shelf and picking platform is arranged in a fixed site.Each shelf stores several types of items.The unit-distance cost of a robot walking loaded with a shelf is c 1 , the unit-distance cost of a robot walking unloaded is c 2 , and the fixed cost of every warehouse robot running one time is r.Let d ij represents the distance of a robot running from shelf s i to shelf s j , and u j represents the distance of a robot transporting shelf s j to its corresponding picking platform.
The operation cost of a warehouse robot completing a given task is composed of three parts: the related cost, the self-cost and the fixed cost.Related cost refers to the cost that the warehouse robot needs to move unloaded from current position to the position of assigned task.Self-cost refers to the cost that the warehouse robot completing a task.The fix cost refers to the cost running a warehouse robot one time.Suppose the current position of robot F l is in the position of shelf s i , if we assign robot F l to finish task s j , then the operation cost of robot F l to finish task s j can be expressed as follows: where d ij is the distance of robot F l running from current position s i to the position of assigned task s j , u j is the double distance from position of task s j to picking platform, r is the fixed cost for controlling robot F l completing one task.
Given an order to be picked in the smart warehouse, there are p tasks to be completed for picking this order (m < p).Assume that the set of tasks for picking this order is , , , p S s s s =  .Suppose there are e orders to be picked in a period of time which are listed in a set: , and the orders are picked one by one, in order to minimize the total operation cost, how to assign all tasks for each warehouse robot and give its working schedule?
The task allocation problem of insufficient warehouse robots (TAPIR) can be decomposed into three subproblems: task grouping problem, task scheduling problem, and task balanced allocation problem.Firstly, all tasks of picking one order are partitioned into several groups, where the number of groups equals to the number of robots.Secondly, the scheduling scheme of each group tasks is given according to every robot.Finally, assign each warehouse robot to complete one group of tasks.
In the following subsections, we will construct the mathematical models for these three sub-problems.

Mathematical Model for the Task Grouping Problem
For the task allocation problem of insufficient warehouse robots (TAPIR), since the number of robots is smaller than the number of tasks for picking an order, so some warehouse robots need to complete more than one tasks when picking one order.Before assign the tasks to robots, we firstly partition all tasks into several groups, where the number of group equals to the number of robots.
In order to reduce the total operation cost and ensure the task allocation of warehouse robots balanced, we define the similarity r ij between task s i and task s j .The similarity r ij can be calculated by formula (1), where d ij is the distance for a robot to move from the site of task s i to the site of task s j , d max is the maximum distance between any pair of tasks ( It is easy to verify that 0 1 ij r ≤ ≤ .If we assign two tasks with larger similarity value to one robot, the related cost will be lower.On the contrary, if we assign two tasks with smaller similarity value to one robot, the related cost will be higher.Based on this idea, we can partition the tasks into several groups according to the similarity value.To ensure the task allocation balanced among all robots, we restrict the number of tasks in each group is no more than a given value D (for example

Define the decision variables:
task is assigned in the th gro ; otherwise 1, 2, , ; The mathematical model of task grouping problem for picking one order can be formulated as an integer programming model.(2) maximizes sum of the average similarity of tasks assigned to the same group; Constraints (3) ensure that each task is just assigned into one group; Constraints (4) and Constraints (5) ensure that each group contains at least one task and no more than D tasks; Constraints (6) indicate that the variables are binary.

Mathematical Model for the Task Scheduling Problem
Because the self-cost of transporting a task to its corresponding picking platform is a constant no matter which warehouse robot completes this task, the fix cost of each robot is also a constant no matter which task it com-pletes, so the total operation cost of warehouse robots depends mainly on the total related cost that the warehouse robots completing all of the tasks.
If a warehouse robot located in s 0 is assigned to complete a group of tasks { } 1 2 , , , q s s s  , the total related cost depends on the scheduling order of the tasks.For example, if the scheduling order of the tasks is , then the total related cost is ( ) . When the scheduling order of tasks changed, the total related cost will change.
Given a warehouse robot and a group of tasks, the task scheduling problem is to find the optimal scheduling order of the tasks, so that the total related cost for the robot completing all tasks is minimal.
Since the related cost depends on the distance between two successive tasks, so the task scheduling problem is similar to Hamiltonian path problem, where the robot should start its routing from initial position s 0 , and visit every site of the task in { } , , , q s s s  one time.After completing all tasks, the robot will stay in the site of the last task, which means that it needs not return to its initial position s 0 .
Suppose that warehouse robot F l (locating in site s 0 ) is assigned to complete the tasks { } , , , q s s s  of group k.Suppose that 1 q s + is a dummy end location, which corresponding to the last location of tasks { } , , , q s s s  .

Define
( ) To find the optimal scheduling order of tasks, we defined the variables as follows: ij f : the flow that run from task s i to task s j , 0,1, , ; 1, 2, , 1 i q j q = = +   after warehouse robot finishing task , it directly ; 0,1, 2, , begin task Otherwise. ; 1, 2, , , 1 1, 0, The task scheduling problem can be formulated into the following integer programming model.
, (7) minimizes the total related cost that the warehouse robot F l completes all tasks in group k; Constraints (8) (9) ensure that each task must be completed by robot F l ; Constraint (10) denote that when a task is completed, the total flow run into it will be absorbed 1 by the task.Constraint (11) ensures the sum of flows come out from location s 0 equals q.Constraint (12) represents the relationship between x ij and f ij ; Constraint (13) indicates that the variables x ij are binary.

Mathematical Model for the Task Balanced Allocation Problem
After calculating the related cost lk w of warehouse robot ( ) . Since we have partitioned the tasks into m groups, each robot needs to complete one and only one group of tasks.The tasks balanced allocation problem is to assign each robot completing only one group of tasks so that the total related costs is minimal.

Define the decision variables:
assign warehouse robot to complete the th group of tasks otherwise 1, ; The mathematical model of tasks balanced allocation problem can be formulated into an integer programming model as follows: = ∑∑ ( ) . .
Objective function ( 14) minimizes the total related cost that warehouse robots complete all groups of tasks; Constraints (15) ensure that each group of tasks can only be assigned to one warehouse robot; Constraints (16) represent that each warehouse robot can only complete one group of tasks; Constraints (17) indicate that the variables are binary.

Algorithms for Solving Three Sub-Problems
In Section 2, we have decomposed the TAPIR problem into three sub-problems and formulate them as integer programming models.For small size of sub-problems, we can solve the integer programming model by Lingo software.Since some sub-problem (such as the second sub-problem) is NP-hard, for larger size of the problem, it is not practical to solve them by Lingo software.In this section, we will respectively design heuristic algorithms for solving each sub-problem of Section 2.

Algorithm for Solving the Task Grouping Problem
Given the number of robots m and the position of each robot, the set of tasks { } , , , p s s s  need to be completed in picking one order.The heuristic algorithm for grouping all tasks into m groups can be described as follows: Initialization: , , , p T s s s =  , group = 0, where T is the set of ungrouped tasks, group denotes the number of non-empty groups.
Step 1: Calculate the similarity matrix ( ) , where r ij is the similarity between task s i and task s j , which can be calculated by Equation (1).
Step 2: Find the smallest value of matrix R , Step 3: If group = m, go to step 4, else.For each i s T ∈ , and 1, , , calculate the average similarity between the ungrouped task s i and all tasks in group k as follows ( ) The sum of average similarity between task s i and all non-empty groups  , .
Find the group with maximum average similarity value. ( Go to Step 4.
Step 5: Output the tasks in each group: 1 2 , , , m G G G  .

Algorithm for Solving the Task Scheduling Problem
To solve the task scheduling problem, we design a heuristic algorithm: Define the following variables: ( ) , route l k represents the scheduling route, whose initial value is empty; location represents the location of robot F l , whose intimal position is 0 l s ; lk w represents the total related cost for robot F l completing tasks in , , , ; The locations of m robots and the sites of each task in m groups.
Step 1: For each robot ( ) and each task group ( ) , , , , , , ( ) Calculate the distance matrix , Step 2: If TN = Φ , go to step 3. Else, find the minimal element of matrix Step 3: Output the total related cost w lk , the optimal scheduling order of tasks ( ) , route l k , and the final loca-tion of robot F l .

Algorithm for Solving the Task Balanced Allocation Problem
After scheduling the tasks of each group, we obtain the related cost matrix ( ) , where w lk represents the related cost of robot F l completing the tasks of groups k.Then the balance allocation problem is converted into an assignment problem, which can be solved by Hungarian Algorithm [7].We can also obtain the optimal solution by solving the integer linear programming model directly.

Simulations Analysis
In this section, we do simulation on a smart warehouse of online bookstore S. At present, online bookstore S uses the smart ware housing system based on cargo-to-person mode.In the warehouse, 96 classes of books are stored in 24 movable shelves.Each shelf stores 4 classes of books.There are 3 picking platforms in the smart warehouse.Currently, the orders are picked one by one.Figure 1 depicts the layout of the warehouse, the square boxes represent 24 shelves and their positions, three rectangular boxes represent three picking platforms; three cycles with arrow represent the warehouse robots.The coordinates of shelves and picking platforms are listed in Table 1.The initial positions of three robots are the same as their nearest shelves.
There are 10 orders to be picked.The tasks sets of 10 orders are listed in Table 2.The unit cost of a robot walking loaded with a shelf is 3 dollars, the unit cost of a robot walking unloaded is 1.9 dollars, and the fixed cost of controlling each warehouse robot completing a task is 10 dollars.In order to minimize the total cost in the process of picking 10 orders, how to allocate and schedule the tasks to each warehouse robot?, , , , ,  s s s s s s Since the orders are picked one by one, for each order to be picked, we can calculate the distance between any pair of tasks, and obtain the similarity matrix by Equation (1).
For the uth ( ) 1, 2, ,10 u =  order, we first partition the tasks into three groups by the heuristic algorithm in section 3.1.
Then we obtain the scheduling order for each group tasks and every robot by the heuristic algorithm in section 3.2.Using the Hungarian Algorithm, we get the tasks assignment and scheduling results, and the total operation cost.
After assigning the tasks of the uth order to the robots, we update the initial position of each robot, and begin to assign the tasks of the ( ) 1 u + th order.Repeat the steps until all tasks of 10 orders are assigned to robots.The simulation results of the first order is depicted in Figure 1, where 8 tasks are partitioned into three groups, the tasks in the same group are surrounded by a closed curve.The optimal tasks assignment and the scheduling routes are F s s s → → → .Which mean that robot F 1 need to com- plete tasks s 24 , s 23 , s 21 in sequence, then stop at position s 21 .Robot F 2 need to complete tasks s 6 , s 2 in sequence, Table 4.The task assignment and optimal scheduling routes, and the operation cost of each order.

Order
Task assignment and optimal scheduling routes Operation cost 1

4 :
Update the number of non-empty group, add the tasks in the new non-empty group, and update the set of ungrouped tasks.If T = Φ , go to step 5. Else add the ungrouped tasks to the group, with which it has the maximum average similaritythe average similarity between s i and each task in group k.( ) in the location row and columns of TN,

Figure 1 .
Figure 1.The layout of the warehouse, the square boxes represent shelves, three rectangular boxes represent three picking platforms three cycles with arrow represent the warehouse robots.8 tasks of the first order depicted in red squares are partitioned into three groups.The tasks in the same group are surrounded by a closed curve (Coordinate Unit: 2 m).

Table 1 .
Coordinates of each shelf and each picking platform.

Table 2 .
The tasks of picking each order.