Allocating Multiple Types of Tasks to Heterogeneous Agents Based on the Theory of Comparative Advantage

We present amethod to allocatemultiple tasks with uncertainty to heterogeneous robots using the theory of comparative advantage: an economic theory that maximizes the benefit of specialization. In real applications, robots often must execute various tasks with uncertainty and future multirobot system will have to work effectively with people as a team. As an example, it may be necessary to explore an unknown environment while executing a main task with people, such as carrying, rescue, military, or construction. The proposed task allocation method is expected to reduce the total makespan (total length of task-execution time) compared with conventional methods in robotic exploration missions. We expect that our method is also effective in terms of calculation time compared with the time-extended allocation method (based on the solution of job-shop scheduling problems). We simulated carrying tasks and exploratory tasks, which include uncertainty conditions such as unknown work environments (2 tasks and 2 robots, multiple tasks and 2 robots, 2 robots and multiple tasks, and multiple tasks and multiple robots). In addition, we compared our method with full searching and methods that maximize the sum of efficiency in these simulations by several conditions: first, 2 tasks (carrying and exploring) in the four uncertain conditions (later time, new objects appearing, disobedient robots, and shorter carrying time) and second, many types of tasks to many types of robots in the three uncertain conditions (unknown carrying time, new objects appearing, and some reasonable agents). The proposed method is also effective in three terms: the task-execution time with an increasing number of objects, uncertain increase in the number of tasks during task execution, and uncertainty agents who are disobedient to allocation orders compared to full searching and methods that maximize the sum of efficiency. Additionally, we performed two real-world experiments with uncertainty.


Introduction
Research on a multirobot task allocation system and coordinating heterogeneous robots have become a hot topic of research in the field robotics.We propose a method of allocating multiple types of tasks to heterogeneous robots, based on the theory of comparative advantage [1], in order to minimize the makespan (the total length of task-execution time).The calculation time in the proposed method is negligibly short compared with the task-execution time, and it may also be effective for dynamic allocation (e.g., in an unknown real environment).
A key driving force of multirobot systems is their force of numbers.Multirobot systems are expected to improve the effectiveness of robotic systems in terms of the temporal efficiency [2].Similar to humans, multiple robots work more effectively than a single robot, even those that do not have complex mechanisms or advanced intelligent control systems.Recent studies on decision-making of multirobot systems focus on two categories: allocation (centralized method for coordinating) and cooperation (decentralized method for coordinating).Yan et al. [3] valued the following two categories: the allocation that the central controller has a global view of the world, whereby the globally optimal plans can be produced, but it is not robust in relation to dynamic environments or failures in communications and other uncertainties and the cooperation can better respond to unknown or uncertain environments, but the solutions they reach are often suboptimal.In the real world, multirobot systems will be offered various tasks of the unknown and uncertain environments.With the advancement of information and communication technology, it will require that multirobot systems for heterogeneous robots have various perception and capability by many vendors.Moreover, effective teamwork between groups of humans and robots is one of the goals in the fields of robotics and AI [4].Multirobot systems must have a view of the environment including the humans.For example, in a rescue or industrial mission, humans and robots are required to work together.Our ultimate goal is allocating tasks to heterogeneous robots and humans, or the cooperating of heterogeneous robots with humans with minimum makespan and the real world.First of all, this study is focused on the allocation of tasks to heterogeneous robots in unknown environments by using the theory of comparative advantage: an economic theory that maximizes the benefit of specialization.
Conventional task allocation methods are categorized as static or dynamic allocation [5].Static allocation gives the task assignments at the start until all the tasks are completed.Static allocation calculates the assignments to minimize the required time.This type of problem, in which the makespan is minimized, is called a job-shop scheduling problem [6].The makespan refers to the total length of the schedule.However, the calculation time of static allocation increases exponentially as the number of tasks increases.In static allocation, the execution time of each task should be calculated and is perturbed by uncertainty.Dynamic allocation frequently conducts reallocation of static allocation [7] and requires more calculation time.
Dispatching methods to reduce the calculation time have been studied.In multirobot task allocation, the methods are instances of optimal assignment problems [8].In the auction based method proposed by Gerkey and Matarić [9], the goal of the problem is to maximize the efficiency per task of allocation, where efficiency refers to the value per unit work of task-execution.However, maximizing the efficiency does not minimize the makespan in the case of allocating tasks to heterogeneous robots.For example, if a robot executes a task that another robot should do, the latter robot must execute yet another task that it is either not proficient at or is hard to execute.This type of loss is called opportunity cost [10].We propose an allocation method based on the theory of comparative advantage, which reduces the opportunity cost and minimizes the makespan.
In this study, the allocation based on our method reduces the makespan compared with methods that maximize the sum of efficiency.We perform simulation experiments in environments with uncertainty and find that allocation based on the proposed method reduces the makespan under any uncertainty, compared with methods that maximize the sum of efficiency.In uncertain environments, the makespan with the proposed method was almost the same compared with frequent reallocation of static allocation.We also conduct a heterogeneous robots task-execution experiment and a human-robot collaborative experiment in the real environment.We propose task allocation methods for various tasks execution by heterogeneous multirobots.The proposed method is expected to be effective in real world experiments, because uncertainty can actually appear.Currently, the area of the human-robot symbiosis is growing rapidly.As stated in the call of this special issue, assembly, warehouses, and home services need human-robot collaboration as soon as possible.Uncertainness of human is not only each individual difference but also effort input in human-robot collaboration.The definition of the theory of comparative advantage had to be extended to adapt to increases in the number of robots and tasks in the real world including humans.

Related Work.
Because of the difficulties of constructing a single robot that has the required capability in real world, in recent literature, there are works on heterogeneous multirobot systems (e.g., in assembly of large-scale structures [2]).To allocate tasks to heterogeneous robots, each robot accomplishes its advantageous task, which increases the time performance [2,11,12].How to optimally assign a set of robots to a set of tasks is well known as multirobot task allocation (MRTA) problem [13].Liemhetcharat and Veloso [14] suggested that "the MRTA problem is categorized along three axes: single-task robots (ST) versus multitask robots (MT), single-robot tasks (SR) versus multirobot tasks (MR), and instantaneous assignment (IA) versus time-extended assignment (TA)."In the example shown in Figure 1, each robot accomplishes its advantageous task.Scheutz et al. [15] showed that swarms of high-and low-speed unmanned aerial vehicles exhibit higher performance than homogeneous swarms in locating and tracking chemical clouds.King et al. [16] performed experiments with a team consisting of rovers and blimps cooperatively executing two types of tasks.Zhang et al. [17] developed a fuzzy collaborative intelligence based algorithm to the collaboration of heterogeneous robots.In these studies, the types of robots are determined in advance, and each robot only executes its specific type of task.Ideally, task allocation methods should not depend on the types of robots, tasks, and environments.Many types of robots are expected to accomplish tasks flexibly as a team operating in any type of environment.
Under other circumstances, the problems of heterogeneous multirobot task allocation problems have been understood as instances of operations research, economics, scheduling, network flows, and combinatorial optimization [5].The allocating methods of these problems are categorized as either static allocation, in which tasks are allocated at the start until all the tasks are completed, or dynamic allocation, in which the next task is allocated to any robot as required.Gerkey and Matarić [5] have categorized task allocation problems in multirobot systems as instantaneous or time-extended assignment.Instantaneous assignment is similar to dynamic allocation, and time-extended assignment is similar to static allocation.Time-extended methods have been based on the scheduling algorithm [18].However, it takes exponential time or longer for these methods to calculate the exact solution.In addition, static allocation is only initially efficient and will degrade over time [19].We suppose that there are several types of uncertainty related to work in real environments.Especially in the human/multirobot collaboration, it is uncertain to predict a human's behavior such as in the following three cases: (i) Uncertainty in task-execution time (ii) Uncertainty increasing the number of tasks during task execution (iii) Uncertainty agent who is disobedient to allocation orders Dynamic allocation is a method that repeatedly allocates tasks dynamically during execution.There are many studies on rescheduling in job-shop scheduling problems in factories.In these works, jobs are added during execution [20], the processing speed is uncertain [7], efficiency under an uncertain environment based on the Intuitionistic Fuzzy Sets [21], slack-based techniques at low levels of uncertainty [22], and so forth.These methods are divided into two types: (1) all task assignments are given repeatedly until all the tasks are completed and (2) no planning for future allocations is performed.The latter is called a dispatching method (e.g., first in first out (FIFO) and shortest processing time (SPT) [18]).Allocations based on rescheduling all the tasks are thought to reduce the makespan, and allocations based on dispatching are thought to reduce the calculation time.The dispatching method is also used in CPU scheduling [23], where tasks (processes) are added successively.Compared with production scheduling in a factory [24], the makespan of multirobot task allocation is thought to be smaller.Computer performance may also be restricted in some multirobot task allocation problems.Therefore, dispatching methods have often been studied in multirobot task allocation (e.g., methods that maximize the sum of efficiency [9,[25][26][27][28][29][30][31][32][33]).These methods entail searching for the best combination of robots and tasks that maximize the sum of efficiency.In this case, efficiency is defined per robot per task, e.g., the inverse of the task-execution time for a robot to perform a task.These methods are based on the solution to the optimal assignment problem [8], the goal of which is to allocate tasks to robots to maximize the overall expected performance.However, allocation based on this method does not necessarily minimize the makespan.In allocation to heterogeneous agents, the opportunity cost can be added to the makespan [10].
Opportunity cost is a term used in economics, representing the value of an alternative forgone (unselected combination) to pursue a certain action.For example, consider that a robot executes a task that another robot should do, to maximize the sum of efficiency, and another robot executes a task for which it cannot minimize the makespan or that it cannot execute.
If the former robot executes the task, the difference in taskexecution times between the robots is added to the makespan as the opportunity cost.We focus on the makespan at the uncertainty and propose an allocating method based on the theory of comparative advantage, which is a framework to minimize makespan including the opportunity cost.

Task Allocation
If robot  has the comparative advantage in task  compared with robot , We define    as the "comparative advantage between robots" and    as the "degree of comparative advantage between tasks": Each comparative advantage between each robot with each task becomes an index to allocate tasks.If robot  is inferior to robot  (    <    ) for task  and has the comparative advantage (see ( 1)), we should allocate robot  to task .The total productivity of task  is given by where    is the working ratio (the labor input rate), which is the cost of robot  completing task  per the total cost of robot .The Pareto front (Figure 2) gives a solution to fix the value of S 1 (= 0 e 1 0 w 1 + 1 e 1 1 w 1 ) total product of task 1 constraints 0 w 0 + 0 w 1 = 1 Pareto front feasible region total product of task 0 S 0 ( ) = 0 e 0 0 w 0 + 1 e 0 1 w 0  the working ratio.In this theory, to obtain the solution of the Pareto front (    = 1), a robot with a comparative advantage (Figure 3) must specialize in a task.We define the cost of robot completing the task as the makespan.For example, when two robots are allocated to two tasks by the Pareto front (Figure 1), robot 0 executes task 0 and robot 1 executes task 1 at first.Throughout the execution time, one robot is perfectly specialized in one task.The other robot first executes its comparatively advantageous task and subsequently executes the other task.When two robots are allocated to multiple tasks by the Pareto front, each robot performs the tasks in order of their comparative advantages.By the Pareto front, one can argue that maximizing the sum of efficiencies is inefficient.For example, Figure 4 shows a set of robots and tasks.According to the Pareto front, robot 0 executes the tasks in the order (2, 1, 0) and robot 1 executes the tasks in the order (0, 1, 2).By maximizing the sum of efficiency, if robot 0 executes any task after finishing task 2, it would not be an optimum allocation by the Pareto front.extended to allocation among multiple robots or multiple tasks [34].Figure 4 shows an example of the allocation of two robots to multiple tasks.In Figure 4, tasks are arranged from the left in ascending order of    of robot 0. The tasks are always arranged in descending order of    of robot 1.

Comparative Advantage with Multiple Agents and
Neither robot should perform tasks that have less    than a benchmark task.We can choose any task as the benchmark task.If the benchmark is task 1, then robot 0 should first execute task 2 and robot 1 should first execute task 0 in the example in Figure 4. Figure 5 shows that each robot performs a task that has a larger    than a benchmark agent.We can choose any agent as the benchmark agent.
In cases of multiple robots and multiple tasks, it will be complex to solve the problem.No general method for describing all the Pareto fronts has been established yet.In economics, several methods have been used to apply the theory of comparative advantage to cases of multiple agents and multiple commodities.There are methods of finding the solutions on the Pareto front or methods in which the number of agents or commodities is restricted [35][36][37].In this study, we use a method proposed by Tian [37].In the following,    is the efficiency of robot  to execute task  (    ) divided by the sum of efficiency per task and robot: Robot  is allocated to task  for which  is maximum.Next, among the combinations of other robots and tasks, the robot and task combination that maximizes  is selected.This procedure is repeated for all the robots.A detailed allocation flowchart is given in Figure 6.

Optimal Assignment Problem.
The optimal assignment problem [8] is a well-known problem in operations research.
In this problem,  robots,  tasks, and nonnegative efficiencies that predict each robot's performance for each task are given.The goal is to assign tasks to robots to maximize the overall expected performance.In the task allocation problem, the goal is to find the appropriate    such that the sum of efficiency is maximized: where  represents the task performance per time and    must be either 0 or 1; if robot  executes task , then    = 1.

Start
Input parameters (i) number of tasks (ii) number of robots (iii) task execution time for each task (iv) timing for reallocation Calculate efficiency (each task × each robot)

Execute tasks
Need to reallocate?This is a method of instantaneous assignment which requires frequently solving the problem.It costs ( 2 ) time using the Hungarian method [38].However, maximizing the sum of efficiency does not always minimize the makespan.For example, in a case where each robot executes each different task (Table 1), robot 0 executes task 1 and robot 1 executes task 0 to maximize the sum of efficiency.Then, the total products are  0 = 1 and  1 = 10, where the solution is not on the Pareto front.In other instances, if robot 1 is specialized in task 1 and the working ratios of robots 0 and 1 are 1  0 = 0.25 and 1  1 = 0.75, respectively, the total products of task 0 are  0 = 1 and  1 = 11.5, where the solution is on the Pareto front.We can regard this multirobot task allocation problem as an extension of the traveling salesman problem (TSP) [39].General TSPs with multiple agents are called multiagent traveling salesman problems [40], vehicle routing problems [41], or job-shop scheduling problems [6].These problems are NP-hard [42]; they cannot be solved in polynomial time [43,44].Instead of listing all the orders (as in the full searching method), there are other methods to decrease the amount of calculation, e.g., by using dynamic programming of time computational quantity (2   2 ) and the branchand-cut algorithm [45].General algorism, such as NN (Neural Network) [46] or ACO (Ant Colony Optimization) [47,48], based approximate solutions are also given.In the study to solve vehicle routing problem, it is well known that the method clusters the area by the number of agents and calculates each shortest path [49].Approximation algorithms and heuristics are, therefore, developed for these problems [48,50,51].However, they require exponential time or longer to calculate the exact solution.
In the uncertain real environment, our proposed method should be able to solve large-scale problems with a large number of robots, tasks, people, animals, and so on.Our method should also be able to compare with different algorithms and the trajectories of robots.There are many things to clarify if our proposed method is feasible or not.But first and foremost, we think the full searching method is plausible to compare with the proposed method.
In this paper, we compare our method with existing methods and show the effectiveness of our method on situations: 2 task and 2 robots (Section 3.1), multiple tasks and 2 robots (Section 3.2), 2 robots and multiple tasks (Section 3.3), and multiple tasks and multiple robots (Section 3.4).As the reason for this, an optimal solution can be calculated for task allocation to the 2 robots situation, to the extent the number of tasks is not large.If our method in these situations is more effective than existing methods for the number of tasks that is more than a certain value, at least, the method has possibilities to solve large task allocation to multiple robots.

Allocating Two Types of Tasks to Two Types of Robots.
To verify the effectiveness of the proposed method, we first simulate allocating two types of tasks to two types of robots (Figure 7).In this study, our purpose is to shorten the makespan of executing tasks in an unknown environment.
Tasks in an unknown environment are divided into two main tasks: exploration and other tasks.We choose the carrying  Not carrying (V  ) C a r r y i n g ( V obj() ) Agent 0 0.33 0.10 Agent 1 1.00 0.033 task as the basic other task in a field that consists of 20 × 20 areas.We define these two types of tasks as follows: (i) Carrying task: carrying objects to a target point (Figure 7, dashed square).This task is finished once the robots have carried all the objects to the target point.
(ii) Exploring task: exploration of the unknown areas for mapping and discovering objects.Robots do not know where the objects are initially.Unknown areas, indicated by white, turn into known areas, indicated by black, when robots pass through the areas.This task is finished once the robots have passed through all the areas.
The two types of robots explore unknown areas and carry discovered objects.Table 2 shows the differences between the two types of robots.Here, V  is the moving velocity when robot  does not carry any object, and V obj() is the moving velocity when robot  carries an object.We define the efficiency (performance per unit work) of the carrying task,  car .In this simulation, the efficiency is the inverse of the time taken for the robot to carry the nearest object to the target point: where  0 is the distance from the robot to the object and  1 is the distance from the object to the target point.We also define the efficiency of the exploring task,  exp .In this situation, it refers to the inverse of the time taken for the robot to go to the nearest unknown area: where  2 is the distance from the robot to the nearest unknown area.In this simulation, the robots are allocated to tasks in the following situations: when one robot finishes carrying an object or exploring an area, when both robots try to carry the same object, and when the comparative advantages of the robots switch.If the allocated task is changed, while a robot is carrying an object, the robot leaves the object.

Comparison with Conventional Method.
In this section, we compare the proposed method with conventional methods, i.e., maximizing the sum of efficiency [9] and exploring first method.In maximizing the sum of efficiency, new task is allocated to a robot which has best efficiency of the task as follows: the robot velocities are listed in Table 3.We defined the efficiency of exploring as the not-carrying velocity.We investigated the following three allocation methods: (i) Proposed method: the theory of comparative advantage (Pareto front).
(iii) Exploring first method: both robots execute the exploring task at first and then execute the carrying task after the exploring task is finished.
We simulate three conditions of the number of objects (4,8,16).Under the proposed method, robot 0 executed the exploring task and robot 1 executed the carrying task.By maximizing the sum of efficiency, each robot executed opposite tasks.Figure 8 shows the results.Allocation based on our method minimized the makespan of the three types of allocation methods under all conditions.

Allocating Multiple Types of Tasks in Unknown
Environment to Two Types of Robots.In unknown environments, robots have to execute many tasks which are manifold and uncertain.We propose a task allocation method based on the theory of comparative advantage in the case where there are multiple tasks in unknown environments.This allocation method is expected to minimize the makespan by executing in order of the comparative advantage between robots.There are many studies about situations consisting of multiple tasks (e.g., restaurants [52] and disaster mitigation [53]).We feature carrying multiple types of objects tasks as multiple types of tasks.We compare our method with the basic allocation method that gives all the task assignments of the entire period (we refer to this method as the full searching method).
We also simulate allocation in unknown environments with possible accidents: later, adding, unreasonable, and speed-up.

Method to Allocate Tasks of Carrying Multiple Types of Objects.
As noted above, we simulated the single-type carrying task allocated to heterogeneous robots by the Pareto front.We evaluate the Pareto front for allocation tasks of carrying multiple types of objects to heterogeneous robots.We define the efficiency of the carrying task    as the time taken for the robot to carry the objects.
where V obj(,) is the moving velocity when robot  is carrying object .The carrying velocity V obj(,) depends on the carried object.The comparative advantage between robots is determined by    /    in (3).When any robot finishes carrying an object, both robots redetermine the carrying objects.
We compare the Pareto front with an allocation method based on the full searching of carrying orders.The full searching method calculates the task-execution times of all the carrying orders in the case of  robots and  objects and calculates an order of minimal time.The number of possible combinations is

Setting of Simulation with Possible
Accidents.We did a simulation to evaluate the proposed method by comparing  it with the full searching method.Table 4 shows the moving velocities for types of robots and types of carrying objects.The field in the simulator consists of 20 × 20 areas (Figure 9).At first, the robots are in the center of the field, and the objects are in random positions.The robots know the positions of all the objects in the known area.The target place that each object should be carried to is different.Each robot carries an object that maximizes the comparative advantage between robots.

Conditions.
We set simulation conditions defining unexpected events that may occur, including the following conditions: (i) Later condition: the time required for a robot to carry is later than predicted.
(ii) Adding condition: new objects appear.
(iii) Unreasonable condition: some robots are disobedient to allocation orders.
(iv) Speed-up condition: the time to reach object positions is shorter than the carrying time.
We hypothesize that the proposed method based on the theory of comparative advantage performs better under these conditions than the full searching methods.In the proposed method, robots execute tasks that are given high priority according to the execution time difference among robots.Thus, the remaining tasks have shorter execution time difference among robots.If unexpected events occur, our method can avoid the situation in which an inappropriate robot executes a task and increases the total task-execution time.
Later Condition.This condition is the situation in which it takes more time to carry objects than predicted.For example, such situations occur when a robot carries an object that needs an unknown time to carry, accidents occur, and so forth.We simulated the delay by multiplying the estimated carrying velocity V obj(,) by noise : where V obj(,) is determined by the allocation and V objreal(,) is the carrying velocity when robots actually carry objects.We define noise  as a random number drawn on a beta distribution.
where  represents a random variable and (, ) is a beta function.At  = 1, the time is the same as predicted.At  = 1/2, it takes twice as much time as predicted. is defined for each combination of robots and objects.The parameter  controls the noise variance.If the value  is smaller, the noise variance increases.Figure 10 shows a plot of the beta distribution with  = 1.
We simulated two types of full searching methods: (1) full searching (static), in which the robots carry objects in the order that is decided at first and (2) full searching (dynamic), in which the robots redetermine the order every time a robot finishes carrying an object.We ran simulations to compare the proposed method and the two types of full searching methods for certain patterns of .
Adding Condition.This condition is the situation in which the number of objects increases.At first, there are seven objects, and some objects are added later.Table 5 lists the carrying velocity and time of added objects.The robots redetermine executing tasks in all the methods every time a robot finishes carrying an object, or an object is added.
Unreasonable Condition.This condition is the situation in which some robots are unreasonable agents (UAs).A human or agent is often disobedient to allocation orders because they are in an inaccessible place, they think of a new way, or for other reasons.In these situations, it is necessary to reallocate tasks for the shortest execution time that the other agents are not executing.The full searching method redetermines the order for the robots every time an agent finishes a task.In this simulation, Robot 1 is a UA and the robot velocities are given in Table 4.
Speed-Up Condition.In this condition, the carrying velocities (Table 6) are increased to 1/10 of the velocities in previous experiments (Table 4).The to move is also shorter than the carrying time.In addition, to evaluate this condition, we combined it with adding a condition.The carrying velocity and time when objects are added are shown in Table 7.
Comparing with Allocation Method of Full Searching of Carrying Orders.The calculation complexity of the proposed method is ().Figure 11 shows the average taskexecution and calculation time for 100 experiments, where there are initially 7, 8, 9, or 10 objects in random places.The task-execution time for the proposed method is slightly longer than that of the full searching method.However, the calculation time in full searching increases exponentially with an increasing number of objects.From this result, if the executing time of the proposed method is slightly longer than the full searching method, it means that the proposed method has a shorter makespan than the full searching method.Our proposed method is effective for the task allocation to multiple robots in uncertain environment.The calculation time in the proposed method is negligibly short compared with the task-execution time: only 0.51 s for an experiment with 10 objects.Our hardware platform was a ThinkPad T530 with a Core i7-3520M processor, 16 GB memory, and HDD running Ubuntu 14.04.
Maximize the Sum of Efficiency.We also compared our method with methods that maximize the sum of efficiency.Table 4 lists the robot velocities.Figure 12 shows the experimental results of 100 time simulations.There were significant differences: (99) = 9.08;  <: 05.This is similar to the results in Section 3.1.

Results of Simulations with Possible Accidents
Results: Later Condition.Figure 13 shows the results.Compared with the full searching (static) method, the allocation based on our method reduced the makespan when the noise variance is large (e.g.,  = 3).Compared with full searching (dynamic) method, the Bonferroni method shows no significant difference between the methods for noises  = 5, 4, 3, except for a significant difference between the method that maximizes the sum of efficiency with the full searching method at  = 5 ( < .01).In the full searching (dynamic) method, the calculation time should be treated as idle time whenever the robots begin working.The substantial task-execution time includes the working and calculating time.Our method shortens the substantial task-execution time compared to that in the full searching (dynamic) method, depending on the number of carrying objects.Compared with methods that maximize the sum of efficiency, the allocation based on the proposed method reduces the makespan.
Results: Adding Condition.Figure 14 shows the experimental results.There are no obvious differences depending on the number of added objects.We confirmed that allocation based on the proposed method reduces the makespan compared with the methods that maximize the sum of efficiency.The Bonferroni method shows a significant difference between the proposed method and the methods that maximize the sum of efficiency under all conditions.However, the Bonferroni method shows no significant difference between the proposed method and the full searching method under all conditions.
Results: Unreasonable Condition.Figure 15 shows the results.
There are significant differences.The proposed method minimizes the makespan of the three methods, in comparison with the full searching method.The UA does not execute an allocated task.In these simulations, the UAs execute the shortest-makespan task of the tasks that other agents are not executing.In the full searching method, the task order for the robots is redetermined every time an agent completes a task.Robot 1 in Table 4 is a UA. Figure 15 shows the results.There are no significant differences.Each cell in Tables 8 and 9 shows the method that reduced the makespan.The bars (-) in the tables indicate that the test shows no significant difference between the methods.As a result, in cases with a UA, the proposed method is more effective than the full searching method.In certain cases without a UA, the proposed method is as effective as the full searching method.
Results: Speed-Up Condition.We think the proposed method is more effective than the full searching method in cases where the differences in efficiency are smaller.Figure 16 shows the results for which the number of objects increases during the task execution.The allocation based on the proposed method reduces the makespan compared with the full searching method.The proposed method gives priority to the tasks whose carrying time differences are large.Therefore,   the opportunity cost, which is the difference in carrying times between robots, is unlikely to increase when compared with the full searching method.The efficiency of each task has less differences depending on the robot position, because the carrying time does not depend on it.The proposed method considers only the instantaneous robot position.We think the Pareto front can shorten the makespan of many robots executing two tasks (exploring and carrying).In this theory, we must nominate a benchmark robot to determine how many robots should be allocated to each task (exploring or carrying) and the benchmark robot is the only one that executes both tasks.For the adjustment to many robots, the following steps are added to the allocation method based on the theory of comparative advantage.To decide a benchmark robot, we performed a simulation.
(1) Nominate a benchmark robot in some way.
(2) Allocate one task to robots that have a comparatively greater degree of advantage than the benchmark robot, according to ( (3) Allocate the other task to the other robots.
The whole-period Pareto front has a limitation for allocating tasks to many types of robots.When one task is finished first, every agent will be executing the other task.This means that there are robots that execute both tasks and the whole-period Pareto front is unadaptable to this situation.The wholeperiod Pareto front can be adapted to the situation in which each robot executes a single task.Hence, to allocate two tasks to many types of robots, it is unadaptable to shorten the overall makespan.However, we think that the particular makespan (e.g., until one task is finished) will be shortened by the whole-period Pareto front.We propose a new method to shorten the overall makespan through the simulation results.

Simulation: Allocate a Carrying and an Exploring
Task to Many Types of Robots.We performed simulation experiments to allocate a carrying and an exploring task to four types of robots by the theory of comparative advantage (Figure 17).We set the moving velocities of four robots as the comparative advantage (Table 10), and (8) gives the efficiency of the robots for each task.We performed the following steps to simulate allocation.
(1) Determine a benchmark robot in number order of robots (decide how many robots to allocate the exploring task).
(2) Allocate exploring task to robots that have a comparatively greater degree of advantage than the benchmark robot.(3) Allocate the carrying task to other robots in the order of the degree of comparative advantage.
(4) Allocate the exploring task to the remaining robots.
We simulated five robot conditions (benchmark robots are 1-4; exploring robots are 0-4) versus the object condition (number of objects are 4 or 16) on the instantaneous Pareto front.Figure 18 shows the results.In both object conditions, when the exploring robot was zero, the instantaneous Pareto front can shorten makespan the most.From these results, we can propose a method "explore until find."Under this method, if an object is found, it should be moved instantly.Accordingly, for few tasks, robots should give preference to other tasks over the exploring task.Thus, we propose a method in the case that there are many tasks in an unknown environment.Method.We propose a method to allocate many types of tasks to many types of robots, based on the theory of comparative advantage proposed by Tian [37].The numbers of robots and objects are represented by  and , respectively.
Here,    is the efficiency for robot  to execute task  (    ) divided by the sum of the efficiencies per task and per robot by (5).Robot  executes task , for which  is maximum.
Next, among the combinations of other robots and tasks, the combination for which  is maximum is selected.This procedure is repeated  times.In case of  = 2, the task selected by this method is always the same as the method of Section 3.1.Figure 19 shows an example of allocation based on this method.The red-colored values indicate the selected tasks.

Verification.
We verify the proposed method to allocate carrying tasks to many robots by a simulation, as shown in Figure 20.The simulation settings used here are the same as those in Section 3.1.We employed the following conditions for verification.
(1) Robot condition: the robots have different comparative advantages.We set the moving velocities of four robots as the comparative advantage (Table 11).
(2) Environment condition: the system knows or does not know about the environment.
(3) Unreasonable condition: this is the same as in Section 3.2: task-execution time, added objects, and unreasonable agent.
We compare the proposed method with the full searching method and the method that maximizes the sum of efficiency.
The full searching method in this section refers to the "dynamic full searching" method: robots are reallocated to each task every time a robot finishes carrying an object.
Figure 21 shows the makespan in these three methods in a known environment.Multiple comparisons with the Bonferroni methods show significant difference between these three methods.The method that maximizes the sum of efficiency is the highest in the known environment.
We show the following results of the conditions in an unknown environment.
Task-Execution Time.We performed simulation experiments in situations where it takes an unknown time to carry objects.Figures    Figure 22: Makespan in situations where carrying objects can be late (three robots).* *  < .01,*  < .05,and +  < .1.A significant  value indicates that a significant difference in prescribing exists between the conditions.The lower  value indicates a strong significant difference.n.s.means no significant difference between the conditions.increasing uncertainty.The Bonferroni method shows no significant differences ( = .05level for  = 4).
Adding Objects.Figures 24 and 25 show the experimental results.Compared with the methods that maximize the sum of efficiency, the proposed method reduces the makespan under any condition.Compared with the full searching method, the makespan ratio decreased with increasing uncertainty.The Bonferroni method shows no significant differences ( = .05level for  add = 2, 3, or 4).
Unreasonable Robots.In this experiment, robots with large index numbers are unreasonable.For example, for two UAs and one reasonable agent (RA), robots 1 and 2 are unreasonable and robot 0 is reasonable.Figures 26 and 27 show the experimental results.Compared with the methods that maximize the sum of efficiency, the proposed method reduces the makespan under any condition.The Bonferroni method shows no significant differences ( = .05).The task-execution time for the proposed method is slightly longer than that of the full searching method from Figures 22-27.However, the calculation time in full searching increases exponentially with an increasing number of objects.We expect that our method will become shorter than full searching with an increase in the number of agents.These results are similar to those in Figure 8, where the allocation based on our method reduces the makespan under any condition compared with methods that maximize the sum of efficiency.Compared with the full searching method, the makespan ratio decreased with increasing uncertainty.28 shows scenes of this experiment.We used two types of robots: a wheeled robot Roomba (iRobot) and a small humanoid NAO (Aldebaran Robotics).These robots can move forward or backward and rotate in their current position.Table 12 shows the speeds of the robots.The objects that should be carried and their features are as follows: (i) Box: both robots can easily carry this object by pushing Roomba.
(ii) Ball on the wall: it is difficult for Roomba to push this object.Roomba cannot move the object to the target area directly, unless Roomba pushes it off the wall.Roomba needs to go around it and move it from behind.NAO can scrape objects from the wall using its hand, which costs approximately 5 s.
(iii) Table : it has four legs.Roomba is not wide enough to span the legs of the long side.Therefore, Roomba must alternately push the left and right legs in order to move the object.NAO has a comparative advantage to carry the table.
We calculated the carrying time using the moving path and moving speeds (Table 12).The robot controller gave a list of points as the moving path to the robots.Figure 28 shows the flow of the experiments.We regard the failure to carry as a factor of the delay of the carrying time.The proposed method is effective in allocating carrying tasks in an unknown environment as well as in the simulation.
Allocating Carrying Tasks to Wheeled Robot and Humanoid.
Figure 28 shows scenes of experiments.(3) shows that Roomba failed to carry the box.If Roomba had not failed, Roomba would have carried the ball.We performed realworld experiments of allocating carrying tasks to real robots using the proposed method.We tried to confirm how our method works in the real world.As a result, the advantage of the proposed method will gradually reduce the differences between the execution times of remaining tasks.
Allocating Tasks to Robot and Human.We also conducted an experiment in which a robot and a human carry objects to confirm the effectiveness of the proposed method in allocation with an unreasonable agent.We used Roomba as the robot.Figure 29 shows the scene of this experiment, which included four types of objects (two boxes, a ball, and a table).Roomba is good at carrying the two boxes and is poor at carrying the table and ball.The human carries an object that the robot is not carrying.The results indicated that the human carried the table and ball, and the robot carried the two boxes.The robot saved carrying time for comparatively disadvantageous objects, thereby reducing the makespan.The robot executed comparatively advantageous tasks and prevented the UA from executing such tasks.The makespan would be reduced by the proposed method.In this research, to allocate tasks to robots, we used the economic theory of comparative advantage as a method to reduce the total makespan.We compared the proposed method with conventional methods used in robotic exploration missions.These results have been enabled by the recent developments in computing power and the ability of robots.In the future, high computing power will reduce the total makespan, particularly the calculating time, and standardized robots that are able to execute multitasks will be developed.However, our method contributes to the efficiency of robots' labor output.Monofunctional robots can practically execute tasks other than their main task (e.g., cleaning task for the Roomba).Real robots can execute tasks that they should not or that their developers did not consider, but only at a low level (e.g., carrying task for the Roomba).

Discussion
In real environments, we cannot perceive everything that occurs.In such cases, our method can allocate the tasks to robots that include these low-level performances on a realtime basis according to the comparative advantage.

Simulation Setting.
We conducted simulation in a field that is free (without obstacles) and small (20 × 20 grid), by robots without sensors and motions.Obstacles increase uncertainty and sensing capability relate closely to a robot's performance.This study is a first step to investigate how to reduce the total makespan by using comparative advantage.We must unite the proposed method with existing algorithms of obstacle avoidance, exploration, and safe wandering.If it is possible to evaluate the performance of agents by real time, our method can be dynamically adaptive.

Future Work.
There have been sparse improvements to the methods of allocating many tasks to many robots.We have a forward-looking approach in which the allocation of next tasks is preliminarily based on the theory of trade with the comparative advantage [54].In the traveling salesman problem or the job-shop scheduling problem, there are many studies to reduce the calculation time.The proposed method should be applied to these studies and our method should be comparatively verified with them.In this study, one robot executes only one task (single-task robots).In the uncertain real environment, it is important to solve complex largescale problems with a large number of robots, tasks, people, animals, and so on.Our method should also be able to be compared with different algorithms and the trajectories of robots.It is necessary to expand this to include the condition under which one robot executes certain tasks at the same time (multitask robots).In addition, the condition under which some robots execute one task at the same time should be considered.We supposed a centralized robot system in this study; thus, we should expand the proposed method to include the distributed autonomous systems.This study investigated the allocation methods using simulations.We must comparatively verify these results in a real environment with other conventional methods such as market-based techniques inclusive of TraderBots [55,56] and Hoplites [57].The uncertainty instances with humans have numerous possible causes.Dealing with true "uncertainty" requires consideration of human-robot collaborations.Performance of a human is not certain quantitatively.Our method observes and calculates the performance of human and allocates tasks to robots with competence dynamically.

Conclusion
We investigated a method of using the theory of comparative advantage to allocate tasks to robots with uncertainty including humans.The proposed method is a dynamic sharing algorithm to allocate uncertainty tasks in an unknown environment, assuming timely reallocation.First, we confirmed that the proposed method reduces the total makespan (the total task-execution time) compared with conventional methods used in robotic exploration missions.We expect that our method is also effective in terms of calculation time when compared with the time-extended allocation method.We simulated carrying tasks and exploring tasks, which include uncertainty conditions of the work in an unknown environment.The proposed method is also more effective in dealing with uncertainty in task-execution time, uncertainty in the increasing number of tasks during task-execution, and uncertainty agents who are disobedient to allocation orders, compared to existing methods (the sum of efficiency and full searching methods).Finally, through experiments in a real environment, we confirmed that the proposed method can reduce the makespan.
This paper makes several contributions to human-robot interaction.First, the effectiveness of a new economic theory was shown for heterogeneous robots.In robot-robot collaboration, it is important to execute tasks even if the robot has inferior ability to accomplish a task.Second, the theory was effective in the uncertain environments including a human.Human-robot collaboration is receiving a lot of attention.The reallocation corresponding to uncertainness of people is a critical issue.

Figure 4 :
Figure 4: Comparative advantage with multiple tasks and two agents.

Figure 5 :
Figure 5: Comparative advantage with two tasks and multiple agents.

Figure 7 :
Figure 7: Simulation: two types of tasks by two types of robots.The field consists of 20 × 20 areas.The red circle and blue square represent the robots, the yellow squares represent objects to be carried, the white shading represents unvisited area, and the black shading represents visited area.

Figure 8 :
Figure 8: Results of proposed and conventional methods.

Figure 13 :
Figure 13: Makespan in the later condition.

Figure 16 :
Figure 16: Makespan in the speed-up condition.(1/10 carrying speed condition).* *  < .01,*  < .05,and +  < .1.A significant  value indicates that a significant difference in prescribing exists between the conditions.The lower  value indicates a strong significant difference.n.s.means no significant difference between the conditions.

Figure 17 :Figure 18 :
Figure 17: Simulation example: allocate the exploring and carrying tasks to four robots.

4 .
Allocating Many Types of Tasks to Many Types of Robots 3.4.1.

Figure 19 :Figure 20 :
Figure 19: Example of allocation based on the proposed method.

Figure 21 :
Figure21: Makespan of some number of robots.* *  < .01,*  < .05,and +  < .1.A significant  value indicates that a significant difference in prescribing exists between the conditions.The lower  value indicates a strong significant difference.n.s.means no significant difference between the conditions.

Figure 23 :Figure 24 :
Figure23: Makespan in situations where carrying objects can be late (four robots).* *  < .01,*  < .05,and +  < .1.A significant  value indicates that a significant difference in prescribing exists between the conditions.The lower  value indicates a strong significant difference.n.s.means no significant difference between the conditions.

Figure 25 :
Figure25: Makespan in situations where carrying objects are added later (four robots).* *  < .01,*  < .05,and +  < .1.A significant  value indicates that a significant difference in prescribing exists between the conditions.The lower  value indicates a strong significant difference.n.s.means no significant difference between the conditions.

Figure 26 :
Figure26: Makespan in situations where there is an unreasonable agent (three robots).* *  < .01,*  < .05,and +  < .1.A significant  value indicates that a significant difference in prescribing exists between the conditions.The lower  value indicates a strong significant difference.n.s.means no significant difference between the conditions.

Figure 28 :Figure 29 :
Figure 28: Experiment of real robots based on the proposed method.(1) Initial state.The robot decided the carrying object based on the list of carrying time.(2) Trying to move each object.(3) Roomba fails to carry the box and try to do again.(4) NAO finishes carrying the stand and begins to carry the ball.(5) Roomba finishes carrying the box.The method then determines which robot carries the ball, and NAO continues carrying the ball.(6) Roomba finished tidying, and NAO continues carrying the ball.

Table 1 :
Example in which maximizing sum of efficiency does not minimize makespan.

Table 2 :
Moving speeds of each robot.
The numbers in brackets represent the object IDs.

Table 5 :
Carrying velocity of added objects.

Table 6 :
Moving velocity (object ID in brackets).

Table 7 :
Moving velocity of added objects.
Figure 14: Makespan in the adding condition.**  < .01,*< .05,and+  < .1.A significant  value indicates that a significant difference in prescribing exists between the conditions.The lower  value indicates a strong significant difference.n.s.means no significant difference between the conditions.Figure 15: Makespan in the unreasonable condition.* *  < .01,*  < .05,and +  < .1.A significant  value indicates that a significant difference in prescribing exists between the conditions.The lower  value indicates a strong significant difference.n.s.means no significant difference between the conditions.

Table 8 :
Comparison between proposed method and full searching (with no unreasonable agents).

Table 9 :
Comparison between proposed method and full searching (with an unreasonable agent).

Table 10 :
Moving velocity (object ID in brackets).
22 and 23show the experimental results.Multiple comparisons with the Bonferroni method revealed that there

Table 12 :
Figure27: Makespan in situations where there is an unreasonable agent (four robots).* *  < .01,*  < .05,and +  < .1.A significant  value indicates that a significant difference in prescribing exists between the conditions.The lower  value indicates a strong significant difference.n.s.means no significant difference between the conditions.Moving ability of each robot.