|
Algorithm 2 The algorithm. |
-
Require:
W,T,;
-
Ensure:
M;
-
1:
mix W,T;
-
2:
shuffle ;
-
3:
-
4:
-
5:
for each
do
-
6:
if
is worker then
-
7:
← Find a list of workers who are friends with the in the system
-
8:
if
is not Null then
-
9:
for each
do
-
10:
Calculate the time relationship strength between and
-
11:
Calculate the geographical relationship strength between and
-
12:
end for
-
13:
Get the categories of tasks that workers having the strongest relationship with in have performed and allocate this kind of task to
-
14:
Add to M
-
15:
else
-
16:
Randomly choose one as the k value from according to the probability
-
17:
Allocate tasks that meet all constraints and utilities of the allocation are higher than
-
18:
Add to M
-
19:
-
20:
Update and
-
21:
end if
-
22:
else
-
23:
Append to
-
24:
end if
-
25:
end for
|