# Multi-Objective Task Scheduling Optimization in Spatial Crowdsourcing
## 3 The MOTSO Model in SC
### The Ranking Strategy Algorithm
#### 3.1.3 The Ranked Tables  
In this step, the RTED and the RTE tables were summed into a new ranked table to select the optimal workers (who have the lowest values) for each task, as shown in Table 6. All of the shaded cells in Table 6 represent the best solution.  
To clarify further, we explain here our ranking strategy through a real example. We ran the ranking strategy algorithm with only five workers and four tasks. Table 2 presents the results of the TED between each task and worker, computed using Equation (2). For each task (row), the algorithm sorted the workers in ascending order based on the TED value. For example, for t1, w4 had the smallest TED value; thus, it took the value of 1 in the RTED table. Then, w1 = 2, w2 = 3, w3 = 4, and w5 = 5. This was done for each task until completing the RTED table. Table 4 shows the results of the TE computed for each task using Equation (3). For each column, the algorithm sorted the tasks in ascending order according to the smallest TE value. For instance, t2 had the smallest entropy value, so it took the value of 1 in the RTE table. Then, t1 = 2, t4 = 3, t3 = 4, etc. After that, RTED and RTE were summed to the ranked table, as shown in Table 6. In our example, the optimal worker for task 1 (t1) was worker 4 (w4), because his ranked value was 3 (where 1 + 2 = 3), which is the smallest compared to the other workers, and so on.  
\begin{table}
\begin{tabular}{c c c c c c c} \hline \hline  & **w1** & **w2** & **w3** & **w4** & **w5** & **The Optimal Worker** \\ \hline
**t1** & 2 + 2 = 4 & 3 + 2 = 5 & 4 + 2 = 6 & 1 + 2 = 3 & 5 + 2 = 7 & w4 \\ \hline
**t2** & 1 + 1 = 2 & 5 + 1 = 6 & 3 + 1 = 4 & 4 + 1 = 5 & 2 + 1 = 3 & w1 \\ \hline
**t3** & 2 + 4 = 6 & 5 + 4 = 9 & 3 + 4 = 7 & 4 + 4 = 8 & 1 + 4 = 5 & w5 \\ \hline
**t4** & 1 + 3 = 4 & 2 + 3 = 5 & 3 + 3 = 6 & 5 + 3 = 8 & 4 + 3 = 7 & w1 \\ \hline \hline \end{tabular}
\end{table}
Table 6: Ranked table.  
\begin{table}
\begin{tabular}{c c c c c c} \hline \hline  & **w1** & **w2** & **w3** & **w4** & **w5** \\ \hline
**t1** & 0.6931471805599453 & 0.6931471805599453 & 0.6931471805599453 & 0.6931471805599453 & 0.6931471805599453 \\ \hline
**t2** & 0.0 & 0.0 & 0.0 & 0.0 & 0.0 \\ \hline
**t3** & 1.386943611198906 & 1.386943611198906 & 1.386943611198906 & 1.386943611198906 \\ \hline
**t4** & 0.6931471805599453 & 0.6931471805599453 & 0.6931471805599453 & 0.6931471805599453 & 0.6931471805599453 \\ \hline \hline \end{tabular}
\end{table}
Table 4: Task entropy (TE).  
\begin{table}
\begin{tabular}{c c c c c c} \hline \hline  & **w1** & **w2** & **w3** & **w4** & **w5** \\ \hline
**t1** & 2 & 2 & 2 & 2 & 2 \\ \hline
**t2** & 1 & 1 & 1 & 1 & 1 \\ \hline
**t3** & 4 & 4 & 4 & 4 & 4 \\ \hline
**t4** & 3 & 3 & 3 & 3 & 3 \\ \hline \hline \end{tabular}
\end{table}
Table 5: Ranked task entropy (RTE).  
In our study, we introduced task completion priority; this means that if the optimal worker has more than one task, the worker must complete the task that has the smaller value compared to the other tasks assigned to them. Two reasons behind giving the task (with a smaller ranked value) a higher priority for completion is to reduce the total travel costs--in that the worker moves first to the closest task--and to ensure the completion of the task that has the lower entropy because higher priority is given to the task that has the lowest entropy in TE, as shown in Table 4 and as we mentioned earlier.  
For more clarification, in Table 6, w1 has t2 and t4, meaning the worker must start by completing t2 then t4 because the ranked value of t2 is equal to 2, which is less than the ranked value of t3, which is equal to 4. After completing the ranked table and finding an optimal worker for each task, the MOPSO starts by utilizing this ranked table as a position of all particles, instead of randomly initializing a position of particles. The next section presents our MOPSO.