Skip to main content
. 2026 Jul 27;26(15):4768. doi: 10.3390/s26154768
Algorithm 1 Overall DT-Assisted Edge Computing System with Freshness Awareness
  • Require: 

    M, T, Δt, Cbackhaul, {ftm, fedgem,j, cedgem,j}, Einit,m, η, ρ, κ, ϵstale

  • Ensure: 

    Decisions {(βit,m,γit,m,δit,m)}

  •   1:

    Initialize E1,m←Einit,m,∀m

  •   2:

    Initialize x1,m←0,∀m, τ1←1

  •   3:

    X1←[x1,1,…,x1,M]

  •   4:

    for t=1 to T do

  •   5:

          Observe incoming tasks {Dit,m,TP,it,m,TD,it,m}

  •   6:

          Compute freshness: Ft←t−τt

  •   7:

          Compute staleness: St←1−exp(−κFt)

  •   8:

          if St>ϵstale then

  •   9:

               Synchronize DT with physical system

  • 10:

               τt←t

  • 11:

               Update Xt

  • 12:

          end if

  • 13:

          zt←FtΨ(Xt)                ▷ Freshness-weighted DT analytics

  • 14:

          for each task i at server m do

  • 15:

               Compute local latency Ti,loct,m using (4)

  • 16:

               Compute migration latency Ti,migt,m(n,j) using (5)

  • 17:

               T˜it,m←min{Ti,loct,m,minn≠m,jTi,migt,m(n,j)}

  • 18:

               if T˜it,m>TD,it,m then

  • 19:

                    δit,m←1, βit,m←0, γit,m←0

  • 20:

                    continue

  • 21:

               end if

  • 22:

               if Triggeroffloadt,m=1 then

  • 23:

                    ProposedMILP(zt,St,i,m)

  • 24:

               else

  • 25:

                    βit,m←1 if UCPU,mt<U¯CPUt−σ

  • 26:

               end if

  • 27:

          end for

  • 28:

          Compute total latency Tit,m using (6)

  • 29:
          Update energy:
    Etm←∑iβit,mEi,loct,m+γit,mEi,migt,m
  • 30:

          Et+1,m←max(Et,m−Etm,ρEinit,m),∀m

  • 31:
          Update fairness:
    U¯CPUt←1M∑mUCPU,mt
  • 32:

          for each server m do

  • 33:
               Extract features:
    yt,m←ϕ(β+γ)D,TP,T
  • 34:
               Update DT state:
    xt+1,m←(1−η)xt,m+ηyt,m+ξt,m
  • 35:

          end for

  • 36:

          Xt+1←[xt+1,1,…,xt+1,M]

  • 37:

    end for

  • 38:

    return all scheduling decisions