Skip to main content
. 2024 Mar 25;24(7):2098. doi: 10.3390/s24072098
Algorithm 2: Scrutiny of Offloaded Task Algorithm using TOPSIS
  • 1

    Inputs:

  • 2

    Parameters used for task scrutiny (Trust probability σTF, task size ts, time elapsed t)

  • 3

    Steps of Algorithm:

  • 4

    1: Normalization of individual vectors per task offloading feature (σTF, ts, t). The Objective of this algorithm is to maximize all the attribute values for the offloaded tasks.

  • 5

        NormalizedValue=ActualValueActualValue2

  • 6

    2: Calculation of the weighted normalized values for each offloaded task

  • 7

        WeightedValue = (σTF×WσTF)+(ts×Wts)+(t×Wt)

  • 8

        where WσTF, Wts, and Wt are the weights.

  • 9

    3: Calculation of the negative-ideal and ideal solutions for each feature.

  • 10

         For the Ideal solution, use the Maximum normalized value for all the parameters.

  • 11

         For the Negative-ideal solution, use minimum normalized value for all the parameters.

  • 12

    4: Calculation of the nearness of every task to the negative-ideal and ideal solutions using a Euclidean distance measure.

  • 13

         Di+=j=1m(NormalizedValueijIdealSolutionj)2

  • 14

         Di=j=1m(NormalizedValueijNegativeIdealSolutionj)2

  • 15

    Step 5: Computation of the TOPSIS measure for every task:

  • 16

         TOPSISi=DiDi++Di

  • 17

    Step 6: Ranking of the tasks based on their TOPSIS scores.

  • 18

         Tasks with a greater value of TOPSIS will be the most favorable for offloading as they match the criteria of higher value for all the parameters.

  • 19

    Output:

  • 20

    The prioritized offloaded tasks for offloading based on TOPSIS scores.

  • 21

    Task offloading starting from highly ranked tasks based on TOPSIS.