<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE article PUBLIC "-//NLM//DTD Journal Publishing DTD v3.0 20080202//EN" "http://dtd.nlm.nih.gov/publishing/3.0/journalpublishing3.dtd">
<article xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink" dtd-version="3.0" xml:lang="en" article-type="research article">
 <front>
  <journal-meta>
   <journal-id journal-id-type="publisher-id">
    jcc
   </journal-id>
   <journal-title-group>
    <journal-title>
     Journal of Computer and Communications
    </journal-title>
   </journal-title-group>
   <issn pub-type="epub">
    2327-5219
   </issn>
   <issn publication-format="print">
    2327-5227
   </issn>
   <publisher>
    <publisher-name>
     Scientific Research Publishing
    </publisher-name>
   </publisher>
  </journal-meta>
  <article-meta>
   <article-id pub-id-type="doi">
    10.4236/jcc.2024.126010
   </article-id>
   <article-id pub-id-type="publisher-id">
    jcc-134131
   </article-id>
   <article-categories>
    <subj-group subj-group-type="heading">
     <subject>
      Articles
     </subject>
    </subj-group>
    <subj-group subj-group-type="Discipline-v2">
     <subject>
      Computer Science 
     </subject>
     <subject>
       Communications
     </subject>
    </subj-group>
   </article-categories>
   <title-group>
    Multi-Agent Deep Deterministic Policy Gradien-Based Task Offloading Resource Allocation Joint Offloading
   </title-group>
   <contrib-group>
    <contrib contrib-type="author" xlink:type="simple">
     <name name-style="western">
      <surname>
       Xuan
      </surname>
      <given-names>
       Zhang
      </given-names>
     </name>
    </contrib>
    <contrib contrib-type="author" xlink:type="simple">
     <name name-style="western">
      <surname>
       Xiaohui
      </surname>
      <given-names>
       Hu
      </given-names>
     </name>
    </contrib>
   </contrib-group> 
   <aff id="affnull">
    <addr-line>
     aCollege of Electronics and Information Engineering, Lanzhou Jiaotong University, Lanzhou, China
    </addr-line> 
   </aff> 
   <pub-date pub-type="epub">
    <day>
     21
    </day> 
    <month>
     06
    </month>
    <year>
     2024
    </year>
   </pub-date> 
   <volume>
    12
   </volume> 
   <issue>
    06
   </issue>
   <fpage>
    152
   </fpage>
   <lpage>
    168
   </lpage>
   <history>
    <date date-type="received">
     <day>
      29,
     </day>
     <month>
      May
     </month>
     <year>
      2024
     </year>
    </date>
    <date date-type="published">
     <day>
      24,
     </day>
     <month>
      May
     </month>
     <year>
      2024
     </year> 
    </date> 
    <date date-type="accepted">
     <day>
      24,
     </day>
     <month>
      June
     </month>
     <year>
      2024
     </year> 
    </date>
   </history>
   <permissions>
    <copyright-statement>
     © Copyright 2014 by authors and Scientific Research Publishing Inc. 
    </copyright-statement>
    <copyright-year>
     2014
    </copyright-year>
    <license>
     <license-p>
      This work is licensed under the Creative Commons Attribution International License (CC BY). http://creativecommons.org/licenses/by/4.0/
     </license-p>
    </license>
   </permissions>
   <abstract>
    With the advancement of technology and the continuous innovation of applications, low-latency applications such as drones, online games and virtual reality are gradually becoming popular demands in modern society. However, these applications pose a great challenge to the traditional centralized mobile cloud computing paradigm, and it is obvious that the traditional cloud computing model is already struggling to meet such demands. To address the shortcomings of cloud computing, mobile edge computing has emerged. Mobile edge computing provides users with computing and storage resources by offloading computing tasks to servers at the edge of the network. However, most existing work only considers single-objective performance optimization in terms of latency or energy consumption, but not balanced optimization in terms of latency and energy consumption. To reduce task latency and device energy consumption, the problem of joint optimization of computation offloading and resource allocation in multi-cell, multi-user, multi-server MEC environments is investigated. In this paper, a dynamic computation offloading algorithm based on Multi-Agent Deep Deterministic Policy Gradient (MADDPG) is proposed to obtain the optimal policy. The experimental results show that the algorithm proposed in this paper reduces the delay by 5 ms compared to PPO, 1.5 ms compared to DDPG and 10.7 ms compared to DQN, and reduces the energy consumption by 300 compared to PPO, 760 compared to DDPG and 380 compared to DQN. This fully proves that the algorithm proposed in this paper has excellent performance.
   </abstract>
   <kwd-group> 
    <kwd>
     Edge Computing
    </kwd> 
    <kwd>
      Task Offloading
    </kwd> 
    <kwd>
      Deep Reinforcement Learning
    </kwd> 
    <kwd>
      Resource Allocation
    </kwd> 
    <kwd>
      MADDPG
    </kwd>
   </kwd-group>
  </article-meta>
 </front>
 <body>
  <sec id="s1">
   <title>1. Introduction</title>
   <p>Over the past two decades, the widespread popularity of mobile devices such as smartphones and tablets has greatly contributed to the rapid development of mobile applications. With the growing usage of these devices, mobile data traffic has shown explosive and exponential growth, which has created unprecedented and significant challenges to the carrying capacity and stability of global mobile networks. In addition, the rise of emerging technologies such as virtual reality (VR) and augmented reality (AR) has placed an unprecedented demand on computing resources and network bandwidth. These technologies provide users with immersive experiences, but also necessitate high-performance hardware support and extensive data transmission.</p>
   <p>To solve these problems, Cloud Computing (CC) has emerged as an innovative computing paradigm <xref ref-type="bibr" rid="scirp.134131-1">
     [1]
    </xref>. Cloud computing allows users to access a variety of configurable system resources such as computing resources, storage space, and applications over a shared network. The advantage of this model is the ability to rapidly reconfigure and deploy resources with minimal cost and service provider involvement.</p>
   <p>In order to overcome these challenges, the industry is exploring new technological solutions such as edge computing, distributed computing and mobile cloud computing. These technologies aim to bring computing and storage resources closer to the user in order to reduce latency, increase bandwidth utilization and reduce energy consumption, thus providing a better user experience.</p>
   <p>In recent years, research on MEC has been relatively active. MEC decomposes and sinks a single cloud function into multiple edge servers <xref ref-type="bibr" rid="scirp.134131-2">
     [2]
    </xref>, and exploits the change of physical location to reduce the latency of task execution processing <xref ref-type="bibr" rid="scirp.134131-3">
     [3]
    </xref>. Some studies simplify MEC as deploying a portion of additional resources on a small base station <xref ref-type="bibr" rid="scirp.134131-4">
     [4]
    </xref> <xref ref-type="bibr" rid="scirp.134131-5">
     [5]
    </xref>, but do not consider the immovability of the base station location, which makes the deployment of edge servers very restrictive. Most of the existing MECs are cloud-edge collaborative architectures <xref ref-type="bibr" rid="scirp.134131-6">
     [6]
    </xref>, which have the advantages of high-speed processing on the cloud side as well as low-latency on the edge side <xref ref-type="bibr" rid="scirp.134131-7">
     [7]
    </xref>. For the problem of task offloading in MEC, see <xref ref-type="bibr" rid="scirp.134131-8">
     [8]
    </xref>. <xref ref-type="bibr" rid="scirp.134131-8">
     [8]
    </xref> considers edge servers with unified computational capabilities and proposes a pseudo-online task scheduling algorithm. Zhu et al. <xref ref-type="bibr" rid="scirp.134131-9">
     [9]
    </xref> consider a joint computation and caching framework that aims to reduce user latency and energy consumption. The authors propose a reinforcement learning algorithm based on deep deterministic policy gradients to implement computational offloading and task caching decisions for users.</p>
   <p>In a recent study, Bowen Yu et al. <xref ref-type="bibr" rid="scirp.134131-10">
     [10]
    </xref> proposed a mobile edge computing framework for ultra-dense networks. The authors developed an optimization model to minimize the overall energy consumption of the device and the base station, while satisfying the constraints of the server quality requirements of the application. Liu et al. <xref ref-type="bibr" rid="scirp.134131-11">
     [11]
    </xref> proposed a computational offloading model based on the frog-jumping algorithm. The authors considered a multi-edge multi-device environment and optimized the offloading decision by using the weighted sum of delay and energy consumption as the optimization objective. Chen Zhao et al. <xref ref-type="bibr" rid="scirp.134131-12">
     [12]
    </xref> considered a UAV-assisted MEC network environment. The authors used multi-intelligent deep reinforcement learning to optimize the trajectory of the UAV and allocate resources. A parallel deep neural network solution was also used to optimize the energy consumption and delay of the network. The results demonstrate that the algorithm enables the UAV to track user movements, thereby significantly reducing the latency and energy consumption of the system.</p>
   <p>Sun et al. <xref ref-type="bibr" rid="scirp.134131-13">
     [13]
    </xref> employed Lyapunov optimization to decompose the task offloading and resource allocation problem into multiple sub-problems. The authors proposed an online energy-efficient task allocation and computational offloading strategy that considers dynamic wireless conditions and delay constraints. Zhou et al. <xref ref-type="bibr" rid="scirp.134131-14">
     [14]
    </xref> proposed a multi-population collaborative elite algorithm based on a genetic algorithm. The authors constructed a directed acyclic graph model of the end-user’s application to facilitate task offload scheduling, with the objective of minimizing the delay and energy consumption of the program. Chen et al. <xref ref-type="bibr" rid="scirp.134131-15">
     [15]
    </xref> proposed a deep reinforcement learning algorithm based on DDPG. The authors pruned, compressed and retrained a deep neural network using filter pruning and tensor decomposition, and subsequently applied the trained neural network model to the DDPG algorithm with the objective of minimizing user energy consumption and total delay.</p>
   <p>Zhao et al. <xref ref-type="bibr" rid="scirp.134131-16">
     [16]
    </xref> have investigated a task offloading strategy for UAV-assisted edge computing environments. The authors minimize the sum of execution delay and energy consumption as an optimization objective. They then design UAV trajectory, task assignment and communication resource management to solve the task offloading problem. Finally, they propose a twin-delay depth deterministic policy gradient algorithm based on twin-delay depth to obtain the global optimal policy. Tong et al. <xref ref-type="bibr" rid="scirp.134131-17">
     [17]
    </xref> propose a potential game and Lagrange multiplier hair-based scheme for offloading end-user tasks and allocating computational resources to MEC servers deployed on near-orbital Earth satellites in a star-Earth network environment.</p>
   <p>Yeganeh et al. <xref ref-type="bibr" rid="scirp.134131-18">
     [18]
    </xref> proposed a Q-Learning scheduling strategy for task offloading. The authors implemented offloading and resource scheduling for MEC with minimizing execution time and energy consumption as optimization objectives. Zaman et al. <xref ref-type="bibr" rid="scirp.134131-19">
     [19]
    </xref> proposed a lightweight mobility prediction and offloading framework to overcome the user’s mobility problem during task delivery. The authors proposed a server selection algorithm based on a multi-objective genetic algorithm to jointly optimize the latency and energy consumption and resource utilization efficiency of MEC servers. Wu et al. <xref ref-type="bibr" rid="scirp.134131-20">
     [20]
    </xref> proposed a deep reinforcement learning-based online task scheduling algorithm for online task offloading. The authors considered setting the edge nodes as public and private nodes.</p>
  </sec><sec id="s2">
   <title>2. System Modelling and Problem Description</title>
   <p>
    <xref ref-type="bibr" rid="scirp.134131-"></xref>This paper first introduces the system architecture from the perspective of communication, computation and energy consumption, including communication model, computation model and energy model, and then gives the problem description.</p>
   <sec id="s2_1">
    <title>2.1. System Modelling</title>
    <p>
     <xref ref-type="fig" rid="fig1">
      Figure 1
     </xref> illustrates the multi-cell, multi-user, multi-server MEC system environment constructed in this study. The system consists of FNV controllers, end users, base stations and MEC servers deployed at the base stations. Each end-user in this MEC system periodically generates tasks. The FNV controller is the control centre of the cell MEC system and can monitor the resources of the MEC in that cell. MECs have more computing power than end users. The MEC server of a cell can make further requests to the FNV servers of other cells to be executed by the MEC servers of other cells and cannot be offloaded to the MEC.</p>
    <fig id="fig1" position="float">
     <label>Figure 1</label>
     <caption>
      <title>Figure 1. MEC system model with multi-cell, multi-user and multi-MEC servers.</title>
     </caption>
     <graphic mimetype="image" position="float" xlink:type="simple" xlink:href="https://html.scirp.org/file/1732761-rId13.jpeg?20240627024512" />
    </fig>
    <p>1) Communication models</p>
    <p>In the system model constructed in this research, the decision cycle is divided into a number of time slots t, where 
     <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <mi>
         t 
       </mi> 
       <mo>
         ∈ 
       </mo> 
       <mi>
         T 
       </mi> 
      </mrow> 
     </math>, 
     <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <mi>
         T 
       </mi> 
       <mo>
         = 
       </mo> 
       <mrow> 
        <mo>
          [ 
        </mo> 
        <mrow> 
         <mn>
           1 
         </mn> 
         <mo>
           , 
         </mo> 
         <mn>
           2 
         </mn> 
         <mo>
           , 
         </mo> 
         <mo>
           ⋯ 
         </mo> 
         <mo>
           , 
         </mo> 
         <msub> 
          <mi>
            T 
          </mi> 
          <mrow> 
           <mi>
             m 
           </mi> 
           <mi>
             a 
           </mi> 
           <mi>
             x 
           </mi> 
          </mrow> 
         </msub> 
        </mrow> 
        <mo>
          ] 
        </mo> 
       </mrow> 
      </mrow> 
     </math>. All MEC servers in a cell can provide services to the users in the cell, but each end-user can only send tasks to one MEC server per time slot. The coordinates of the end users are defined as 
     <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <msub> 
        <mi>
          L 
        </mi> 
        <mrow> 
         <msub> 
          <mi>
            u 
          </mi> 
          <mrow> 
           <mi>
             i 
           </mi> 
           <mo>
             , 
           </mo> 
           <mi>
             j 
           </mi> 
          </mrow> 
         </msub> 
        </mrow> 
       </msub> 
       <mrow> 
        <mo>
          ( 
        </mo> 
        <mi>
          t 
        </mi> 
        <mo>
          ) 
        </mo> 
       </mrow> 
       <mo>
         = 
       </mo> 
       <mrow> 
        <mo>
          [ 
        </mo> 
        <mrow> 
         <msub> 
          <mi>
            x 
          </mi> 
          <mrow> 
           <msub> 
            <mi>
              u 
            </mi> 
            <mrow> 
             <mi>
               i 
             </mi> 
             <mo>
               , 
             </mo> 
             <mi>
               j 
             </mi> 
            </mrow> 
           </msub> 
          </mrow> 
         </msub> 
         <mo>
           , 
         </mo> 
         <msub> 
          <mi>
            y 
          </mi> 
          <mrow> 
           <msub> 
            <mi>
              u 
            </mi> 
            <mrow> 
             <mi>
               i 
             </mi> 
             <mo>
               , 
             </mo> 
             <mi>
               j 
             </mi> 
            </mrow> 
           </msub> 
          </mrow> 
         </msub> 
        </mrow> 
        <mo>
          ] 
        </mo> 
       </mrow> 
      </mrow> 
     </math> and the coordinates of the MEC servers are defined as 
     <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <msub> 
        <mi>
          L 
        </mi> 
        <mrow> 
         <mi>
           M 
         </mi> 
         <mi>
           E 
         </mi> 
         <msub> 
          <mi>
            C 
          </mi> 
          <mrow> 
           <mi>
             i 
           </mi> 
           <mo>
             , 
           </mo> 
           <mi>
             k 
           </mi> 
          </mrow> 
         </msub> 
        </mrow> 
       </msub> 
       <mo>
         = 
       </mo> 
       <mrow> 
        <mo>
          [ 
        </mo> 
        <mrow> 
         <msub> 
          <mi>
            x 
          </mi> 
          <mrow> 
           <mi>
             M 
           </mi> 
           <mi>
             E 
           </mi> 
           <msub> 
            <mi>
              C 
            </mi> 
            <mrow> 
             <mi>
               i 
             </mi> 
             <mo>
               , 
             </mo> 
             <mi>
               k 
             </mi> 
            </mrow> 
           </msub> 
          </mrow> 
         </msub> 
         <mo>
           , 
         </mo> 
         <msub> 
          <mi>
            y 
          </mi> 
          <mrow> 
           <mi>
             M 
           </mi> 
           <mi>
             E 
           </mi> 
           <msub> 
            <mi>
              C 
            </mi> 
            <mrow> 
             <mi>
               i 
             </mi> 
             <mo>
               , 
             </mo> 
             <mi>
               k 
             </mi> 
            </mrow> 
           </msub> 
          </mrow> 
         </msub> 
        </mrow> 
        <mo>
          ] 
        </mo> 
       </mrow> 
      </mrow> 
     </math>. The system has s cells with b end users and m MEC servers in each cell. In this paper it is assumed that the location of the end users within the cell is random, but the MEC servers in the cell are fixed.</p>
    <p>This study considers the use of Orthogonal Frequency Division Multiple Access (OFDMA) to implement the communication between users and MEC servers, and the MEC server links between different cells are connected by optical fibres. Next, assume that the kth MEC server is selected for the task. According to Shannon's formula, terminal 
     <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <msub> 
        <mi>
          u 
        </mi> 
        <mrow> 
         <mi>
           i 
         </mi> 
         <mo>
           , 
         </mo> 
         <mi>
           j 
         </mi> 
        </mrow> 
       </msub> 
      </mrow> 
     </math> transmits the task at a rate of</p>
    <p>
     <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <mi>
         R 
       </mi> 
       <mi>
         a 
       </mi> 
       <mi>
         t 
       </mi> 
       <msub> 
        <mi>
          e 
        </mi> 
        <mrow> 
         <mi>
           i 
         </mi> 
         <mo>
           , 
         </mo> 
         <mi>
           j 
         </mi> 
        </mrow> 
       </msub> 
       <mrow> 
        <mo>
          ( 
        </mo> 
        <mi>
          t 
        </mi> 
        <mo>
          ) 
        </mo> 
       </mrow> 
       <mo>
         = 
       </mo> 
       <msub> 
        <mi>
          W 
        </mi> 
        <mrow> 
         <mi>
           i 
         </mi> 
         <mo>
           , 
         </mo> 
         <mi>
           j 
         </mi> 
        </mrow> 
       </msub> 
       <msub> 
        <mrow> 
         <mtext>
           log 
         </mtext> 
        </mrow> 
        <mn>
          2 
        </mn> 
       </msub> 
       <mrow> 
        <mo>
          ( 
        </mo> 
        <mrow> 
         <mn>
           1 
         </mn> 
         <mo>
           + 
         </mo> 
         <mfrac> 
          <mrow> 
           <msubsup> 
            <mi>
              p 
            </mi> 
            <mrow> 
             <mi>
               i 
             </mi> 
             <mo>
               , 
             </mo> 
             <mi>
               j 
             </mi> 
            </mrow> 
            <mi>
              u 
            </mi> 
           </msubsup> 
           <msub> 
            <mi>
              h 
            </mi> 
            <mrow> 
             <mi>
               i 
             </mi> 
             <mo>
               , 
             </mo> 
             <mi>
               j 
             </mi> 
            </mrow> 
           </msub> 
          </mrow> 
          <mrow> 
           <mstyle displaystyle="true"> 
            <munderover> 
             <mo>
               ∑ 
             </mo> 
             <mrow> 
              <mi>
                c 
              </mi> 
              <mo>
                = 
              </mo> 
              <mn>
                1 
              </mn> 
              <mo>
                , 
              </mo> 
              <mi>
                c 
              </mi> 
              <mo>
                ≠ 
              </mo> 
              <mi>
                j 
              </mi> 
             </mrow> 
             <mi>
               b 
             </mi> 
            </munderover> 
            <mrow> 
             <msubsup> 
              <mi>
                p 
              </mi> 
              <mrow> 
               <mi>
                 i 
               </mi> 
               <mo>
                 , 
               </mo> 
               <mi>
                 c 
               </mi> 
              </mrow> 
              <mi>
                u 
              </mi> 
             </msubsup> 
             <msub> 
              <mi>
                h 
              </mi> 
              <mrow> 
               <mi>
                 i 
               </mi> 
               <mo>
                 , 
               </mo> 
               <mi>
                 c 
               </mi> 
              </mrow> 
             </msub> 
            </mrow> 
           </mstyle> 
           <mo>
             + 
           </mo> 
           <msup> 
            <mi>
              σ 
            </mi> 
            <mn>
              2 
            </mn> 
           </msup> 
          </mrow> 
         </mfrac> 
        </mrow> 
        <mo>
          ) 
        </mo> 
       </mrow> 
      </mrow> 
     </math> (1)</p>
    <p>where W is the bandwidth of the subchannel, 
     <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <msubsup> 
        <mi>
          p 
        </mi> 
        <mrow> 
         <mi>
           i 
         </mi> 
         <mo>
           , 
         </mo> 
         <mi>
           j 
         </mi> 
        </mrow> 
        <mi>
          u 
        </mi> 
       </msubsup> 
      </mrow> 
     </math> and 
     <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <msubsup> 
        <mi>
          h 
        </mi> 
        <mrow> 
         <mi>
           i 
         </mi> 
         <mo>
           , 
         </mo> 
         <mi>
           j 
         </mi> 
        </mrow> 
        <mi>
          z 
        </mi> 
       </msubsup> 
      </mrow> 
     </math> are the received power and channel gain of the device in the channel, respectively. 
     <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mi>
        σ 
      </mi> 
     </math> is Gaussian noise.</p>
    <p>The communication link in the system is assumed to be a line-of-sight link channel control, the channel gain can be expressed as:</p>
    <p>
     <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <msubsup> 
        <mi>
          h 
        </mi> 
        <mrow> 
         <mi>
           i 
         </mi> 
         <mo>
           , 
         </mo> 
         <mi>
           j 
         </mi> 
        </mrow> 
        <mi>
          z 
        </mi> 
       </msubsup> 
       <mo>
         = 
       </mo> 
       <mfrac> 
        <mrow> 
         <msubsup> 
          <mi>
            P 
          </mi> 
          <mrow> 
           <mi>
             i 
           </mi> 
           <mo>
             , 
           </mo> 
           <mi>
             j 
           </mi> 
          </mrow> 
          <mrow> 
           <mi>
             u 
           </mi> 
           <mi>
             p 
           </mi> 
          </mrow> 
         </msubsup> 
        </mrow> 
        <mrow> 
         <mrow> 
          <mo>
            ‖ 
          </mo> 
          <mrow> 
           <msub> 
            <mi>
              L 
            </mi> 
            <mrow> 
             <mi>
               M 
             </mi> 
             <mi>
               E 
             </mi> 
             <msub> 
              <mi>
                C 
              </mi> 
              <mrow> 
               <mi>
                 i 
               </mi> 
               <mo>
                 , 
               </mo> 
               <mi>
                 k 
               </mi> 
              </mrow> 
             </msub> 
            </mrow> 
           </msub> 
           <mo>
             − 
           </mo> 
           <msub> 
            <mi>
              L 
            </mi> 
            <mrow> 
             <msub> 
              <mi>
                u 
              </mi> 
              <mrow> 
               <mi>
                 i 
               </mi> 
               <mo>
                 , 
               </mo> 
               <mi>
                 j 
               </mi> 
              </mrow> 
             </msub> 
            </mrow> 
           </msub> 
           <mrow> 
            <mo>
              ( 
            </mo> 
            <mi>
              t 
            </mi> 
            <mo>
              ) 
            </mo> 
           </mrow> 
          </mrow> 
          <mo>
            ‖ 
          </mo> 
         </mrow> 
        </mrow> 
       </mfrac> 
      </mrow> 
     </math> (2)</p>
    <p>1) Computational modelling</p>
    <p>A partial offloading model is considered in this study. The user offloads part of the computational tasks to the MEC server and further to other cells according to the offloading policy. Meanwhile, due to the use of optical fibre transmission between MEC servers, which has a high transmission rate that can reach 201.6 Gbps <xref ref-type="bibr" rid="scirp.134131-15">
      [15]
     </xref>. The system model in this study ignores the task backhaul delay and the inter-cell data transmission delay. It is assumed that the task selects the kth MEC server for offloading. The key components of the system experiment during offloading can be calculated as follows:</p>
    <p>1) The time taken by the end user to transmit the task to the MEC server;</p>
    <p>2) The time delay for the end user to process the task;</p>
    <p>3) The time delay for the MEC in that cell to process the task;</p>
    <p>4) The time delay for MECs in other cells to process the task.</p>
    <p>The time at which the end user transmits the task to the MEC server can be expressed as</p>
    <p>
     <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <msubsup> 
        <mi>
          T 
        </mi> 
        <mrow> 
         <mi>
           i 
         </mi> 
         <mo>
           , 
         </mo> 
         <mi>
           j 
         </mi> 
        </mrow> 
        <mrow> 
         <mi>
           t 
         </mi> 
         <mi>
           r 
         </mi> 
         <mi>
           a 
         </mi> 
        </mrow> 
       </msubsup> 
       <mrow> 
        <mo>
          ( 
        </mo> 
        <mi>
          t 
        </mi> 
        <mo>
          ) 
        </mo> 
       </mrow> 
       <mo>
         = 
       </mo> 
       <mfrac> 
        <mrow> 
         <mrow> 
          <mo>
            ( 
          </mo> 
          <mrow> 
           <mn>
             1 
           </mn> 
           <mo>
             − 
           </mo> 
           <msubsup> 
            <mi>
              R 
            </mi> 
            <mrow> 
             <mi>
               i 
             </mi> 
             <mo>
               , 
             </mo> 
             <mi>
               j 
             </mi> 
            </mrow> 
            <mrow> 
             <mi>
               r 
             </mi> 
             <mi>
               m 
             </mi> 
            </mrow> 
           </msubsup> 
           <mrow> 
            <mo>
              ( 
            </mo> 
            <mi>
              t 
            </mi> 
            <mo>
              ) 
            </mo> 
           </mrow> 
          </mrow> 
          <mo>
            ) 
          </mo> 
         </mrow> 
         <msub> 
          <mi>
            c 
          </mi> 
          <mrow> 
           <mi>
             i 
           </mi> 
           <mo>
             , 
           </mo> 
           <mi>
             j 
           </mi> 
          </mrow> 
         </msub> 
         <mrow> 
          <mo>
            ( 
          </mo> 
          <mi>
            t 
          </mi> 
          <mo>
            ) 
          </mo> 
         </mrow> 
        </mrow> 
        <mrow> 
         <mi>
           R 
         </mi> 
         <mi>
           a 
         </mi> 
         <mi>
           t 
         </mi> 
         <msub> 
          <mi>
            e 
          </mi> 
          <mrow> 
           <mi>
             i 
           </mi> 
           <mo>
             , 
           </mo> 
           <mi>
             j 
           </mi> 
          </mrow> 
         </msub> 
         <mrow> 
          <mo>
            ( 
          </mo> 
          <mi>
            t 
          </mi> 
          <mo>
            ) 
          </mo> 
         </mrow> 
        </mrow> 
       </mfrac> 
      </mrow> 
     </math> (3)</p>
    <p>where 
     <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <msub> 
        <mi>
          c 
        </mi> 
        <mrow> 
         <mi>
           i 
         </mi> 
         <mo>
           , 
         </mo> 
         <mi>
           j 
         </mi> 
        </mrow> 
       </msub> 
       <mrow> 
        <mo>
          ( 
        </mo> 
        <mi>
          t 
        </mi> 
        <mo>
          ) 
        </mo> 
       </mrow> 
      </mrow> 
     </math> denotes the size of the task generated by the end user. 
     <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <msubsup> 
        <mi>
          R 
        </mi> 
        <mrow> 
         <mi>
           i 
         </mi> 
         <mo>
           , 
         </mo> 
         <mi>
           j 
         </mi> 
        </mrow> 
        <mrow> 
         <mi>
           r 
         </mi> 
         <mi>
           m 
         </mi> 
        </mrow> 
       </msubsup> 
       <mrow> 
        <mo>
          ( 
        </mo> 
        <mi>
          t 
        </mi> 
        <mo>
          ) 
        </mo> 
       </mrow> 
      </mrow> 
     </math> denotes the end-user offload rate.</p>
    <p>The end user processing delay is can be denoted as:</p>
    <p>
     <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <msubsup> 
        <mi>
          T 
        </mi> 
        <mrow> 
         <mi>
           i 
         </mi> 
         <mo>
           , 
         </mo> 
         <mi>
           j 
         </mi> 
        </mrow> 
        <mi>
          L 
        </mi> 
       </msubsup> 
       <mrow> 
        <mo>
          ( 
        </mo> 
        <mi>
          t 
        </mi> 
        <mo>
          ) 
        </mo> 
       </mrow> 
       <mo>
         = 
       </mo> 
       <mfrac> 
        <mrow> 
         <mrow> 
          <mo>
            ( 
          </mo> 
          <mrow> 
           <mn>
             1 
           </mn> 
           <mo>
             − 
           </mo> 
           <msub> 
            <mi>
              R 
            </mi> 
            <mrow> 
             <mi>
               r 
             </mi> 
             <mi>
               m 
             </mi> 
            </mrow> 
           </msub> 
           <mrow> 
            <mo>
              ( 
            </mo> 
            <mi>
              t 
            </mi> 
            <mo>
              ) 
            </mo> 
           </mrow> 
          </mrow> 
          <mo>
            ) 
          </mo> 
         </mrow> 
         <msub> 
          <mi>
            c 
          </mi> 
          <mrow> 
           <mi>
             i 
           </mi> 
           <mo>
             , 
           </mo> 
           <mi>
             j 
           </mi> 
          </mrow> 
         </msub> 
         <mrow> 
          <mo>
            ( 
          </mo> 
          <mi>
            t 
          </mi> 
          <mo>
            ) 
          </mo> 
         </mrow> 
         <mi>
           z 
         </mi> 
        </mrow> 
        <mrow> 
         <msubsup> 
          <mi>
            f 
          </mi> 
          <mrow> 
           <mi>
             i 
           </mi> 
           <mo>
             , 
           </mo> 
           <mi>
             j 
           </mi> 
          </mrow> 
          <mi>
            L 
          </mi> 
         </msubsup> 
        </mrow> 
       </mfrac> 
      </mrow> 
     </math> (4)</p>
    <p>where z is the required calculation frequency per task unit. 
     <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <msubsup> 
        <mi>
          f 
        </mi> 
        <mrow> 
         <mi>
           i 
         </mi> 
         <mo>
           , 
         </mo> 
         <mi>
           j 
         </mi> 
        </mrow> 
        <mi>
          L 
        </mi> 
       </msubsup> 
      </mrow> 
     </math> is the computation frequency of the user.</p>
    <p>The delay of this cell MEC processing task can be expressed as</p>
    <p>
     <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <msub> 
        <mi>
          T 
        </mi> 
        <mrow> 
         <mi>
           i 
         </mi> 
         <mo>
           , 
         </mo> 
         <mi>
           j 
         </mi> 
         <mo>
           , 
         </mo> 
         <mi>
           v 
         </mi> 
        </mrow> 
       </msub> 
       <mrow> 
        <mo>
          ( 
        </mo> 
        <mi>
          t 
        </mi> 
        <mo>
          ) 
        </mo> 
       </mrow> 
       <mo>
         = 
       </mo> 
       <mfrac> 
        <mrow> 
         <mrow> 
          <mo>
            ( 
          </mo> 
          <mrow> 
           <mn>
             1 
           </mn> 
           <mo>
             − 
           </mo> 
           <msubsup> 
            <mi>
              R 
            </mi> 
            <mrow> 
             <mi>
               i 
             </mi> 
             <mo>
               , 
             </mo> 
             <mi>
               j 
             </mi> 
            </mrow> 
            <mrow> 
             <mi>
               r 
             </mi> 
             <mi>
               s 
             </mi> 
            </mrow> 
           </msubsup> 
           <mrow> 
            <mo>
              ( 
            </mo> 
            <mi>
              t 
            </mi> 
            <mo>
              ) 
            </mo> 
           </mrow> 
          </mrow> 
          <mo>
            ) 
          </mo> 
         </mrow> 
         <msubsup> 
          <mi>
            R 
          </mi> 
          <mrow> 
           <mi>
             i 
           </mi> 
           <mo>
             , 
           </mo> 
           <mi>
             j 
           </mi> 
          </mrow> 
          <mrow> 
           <mi>
             r 
           </mi> 
           <mi>
             m 
           </mi> 
          </mrow> 
         </msubsup> 
         <mrow> 
          <mo>
            ( 
          </mo> 
          <mi>
            t 
          </mi> 
          <mo>
            ) 
          </mo> 
         </mrow> 
         <msub> 
          <mi>
            c 
          </mi> 
          <mrow> 
           <mi>
             i 
           </mi> 
           <mo>
             , 
           </mo> 
           <mi>
             j 
           </mi> 
          </mrow> 
         </msub> 
         <mrow> 
          <mo>
            ( 
          </mo> 
          <mi>
            t 
          </mi> 
          <mo>
            ) 
          </mo> 
         </mrow> 
         <mi>
           z 
         </mi> 
        </mrow> 
        <mrow> 
         <msub> 
          <mi>
            θ 
          </mi> 
          <mrow> 
           <mi>
             i 
           </mi> 
           <mo>
             , 
           </mo> 
           <mi>
             j 
           </mi> 
          </mrow> 
         </msub> 
         <mrow> 
          <mo>
            ( 
          </mo> 
          <mi>
            t 
          </mi> 
          <mo>
            ) 
          </mo> 
         </mrow> 
         <msub> 
          <mi>
            f 
          </mi> 
          <mrow> 
           <mi>
             i 
           </mi> 
           <mo>
             , 
           </mo> 
           <mi>
             k 
           </mi> 
          </mrow> 
         </msub> 
        </mrow> 
       </mfrac> 
      </mrow> 
     </math> (5)</p>
    <p>where 
     <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <msub> 
        <mi>
          θ 
        </mi> 
        <mrow> 
         <mi>
           i 
         </mi> 
         <mo>
           , 
         </mo> 
         <mi>
           j 
         </mi> 
        </mrow> 
       </msub> 
       <mrow> 
        <mo>
          ( 
        </mo> 
        <mi>
          t 
        </mi> 
        <mo>
          ) 
        </mo> 
       </mrow> 
      </mrow> 
     </math> denotes the proportion of computational resources of the MEC server to which the user is assigned, and 
     <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <msub> 
        <mi>
          f 
        </mi> 
        <mrow> 
         <mi>
           i 
         </mi> 
         <mo>
           , 
         </mo> 
         <mi>
           k 
         </mi> 
        </mrow> 
       </msub> 
      </mrow> 
     </math> the computational frequency of the MEC to which it is assigned. 
     <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <msubsup> 
        <mi>
          R 
        </mi> 
        <mrow> 
         <mi>
           i 
         </mi> 
         <mo>
           , 
         </mo> 
         <mi>
           j 
         </mi> 
        </mrow> 
        <mrow> 
         <mi>
           r 
         </mi> 
         <mi>
           s 
         </mi> 
        </mrow> 
       </msubsup> 
       <mrow> 
        <mo>
          ( 
        </mo> 
        <mi>
          t 
        </mi> 
        <mo>
          ) 
        </mo> 
       </mrow> 
      </mrow> 
     </math> denotes the proportion of tasks transmitted to other cells.</p>
    <p>The delay of the MEC server in the other cell to process the task can be expressed as:</p>
    <p>
     <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <msub> 
        <mi>
          T 
        </mi> 
        <mrow> 
         <mi>
           i 
         </mi> 
         <mo>
           , 
         </mo> 
         <mi>
           j 
         </mi> 
         <mo>
           , 
         </mo> 
         <mi>
           o 
         </mi> 
         <mi>
           v 
         </mi> 
        </mrow> 
       </msub> 
       <mrow> 
        <mo>
          ( 
        </mo> 
        <mi>
          t 
        </mi> 
        <mo>
          ) 
        </mo> 
       </mrow> 
       <mo>
         = 
       </mo> 
       <mfrac> 
        <mrow> 
         <msub> 
          <mi>
            R 
          </mi> 
          <mrow> 
           <mi>
             r 
           </mi> 
           <mi>
             s 
           </mi> 
          </mrow> 
         </msub> 
         <mrow> 
          <mo>
            ( 
          </mo> 
          <mi>
            t 
          </mi> 
          <mo>
            ) 
          </mo> 
         </mrow> 
         <msub> 
          <mi>
            R 
          </mi> 
          <mrow> 
           <mi>
             r 
           </mi> 
           <mi>
             m 
           </mi> 
          </mrow> 
         </msub> 
         <mrow> 
          <mo>
            ( 
          </mo> 
          <mi>
            t 
          </mi> 
          <mo>
            ) 
          </mo> 
         </mrow> 
         <msub> 
          <mi>
            c 
          </mi> 
          <mrow> 
           <mi>
             i 
           </mi> 
           <mo>
             , 
           </mo> 
           <mi>
             j 
           </mi> 
          </mrow> 
         </msub> 
         <mrow> 
          <mo>
            ( 
          </mo> 
          <mi>
            t 
          </mi> 
          <mo>
            ) 
          </mo> 
         </mrow> 
        </mrow> 
        <mrow> 
         <msub> 
          <msup> 
           <mi>
             θ 
           </mi> 
           <mo>
             ′ 
           </mo> 
          </msup> 
          <mrow> 
           <mi>
             i 
           </mi> 
           <mo>
             , 
           </mo> 
           <mi>
             l 
           </mi> 
          </mrow> 
         </msub> 
         <mrow> 
          <mo>
            ( 
          </mo> 
          <mi>
            t 
          </mi> 
          <mo>
            ) 
          </mo> 
         </mrow> 
         <msub> 
          <mi>
            f 
          </mi> 
          <mrow> 
           <mi>
             i 
           </mi> 
           <mo>
             , 
           </mo> 
           <mi>
             k 
           </mi> 
          </mrow> 
         </msub> 
        </mrow> 
       </mfrac> 
      </mrow> 
     </math> (6)</p>
    <p>where 
     <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <msub> 
        <msup> 
         <mi>
           θ 
         </mi> 
         <mo>
           ′ 
         </mo> 
        </msup> 
        <mrow> 
         <mi>
           i 
         </mi> 
         <mo>
           , 
         </mo> 
         <mi>
           l 
         </mi> 
        </mrow> 
       </msub> 
       <mrow> 
        <mo>
          ( 
        </mo> 
        <mi>
          t 
        </mi> 
        <mo>
          ) 
        </mo> 
       </mrow> 
      </mrow> 
     </math> denotes the proportion of computing resources allocated to the task by MECs in other cells.</p>
    <p>In this paper, it is assumed that the MEC server can only execute the task after the transmission is completed. At the same time, the transmission task starts when the end device starts executing the local task. At this time, the delay of each task is the maximum of the end-user computational delay, the computational delay of the MEC server and the transmission delay, which can be expressed as:</p>
    <p>
     <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <msub> 
        <mi>
          T 
        </mi> 
        <mrow> 
         <mi>
           i 
         </mi> 
         <mo>
           , 
         </mo> 
         <mi>
           j 
         </mi> 
        </mrow> 
       </msub> 
       <mrow> 
        <mo>
          ( 
        </mo> 
        <mi>
          t 
        </mi> 
        <mo>
          ) 
        </mo> 
       </mrow> 
       <mo>
         = 
       </mo> 
       <mi>
         max 
       </mi> 
       <mrow> 
        <mo>
          ( 
        </mo> 
        <mrow> 
         <msubsup> 
          <mi>
            T 
          </mi> 
          <mrow> 
           <mi>
             i 
           </mi> 
           <mo>
             , 
           </mo> 
           <mi>
             j 
           </mi> 
          </mrow> 
          <mi>
            L 
          </mi> 
         </msubsup> 
         <mrow> 
          <mo>
            ( 
          </mo> 
          <mi>
            t 
          </mi> 
          <mo>
            ) 
          </mo> 
         </mrow> 
         <mo>
           , 
         </mo> 
         <msubsup> 
          <mi>
            T 
          </mi> 
          <mrow> 
           <mi>
             i 
           </mi> 
           <mo>
             , 
           </mo> 
           <mi>
             j 
           </mi> 
          </mrow> 
          <mrow> 
           <mi>
             t 
           </mi> 
           <mi>
             r 
           </mi> 
           <mi>
             a 
           </mi> 
          </mrow> 
         </msubsup> 
         <mrow> 
          <mo>
            ( 
          </mo> 
          <mi>
            t 
          </mi> 
          <mo>
            ) 
          </mo> 
         </mrow> 
         <mo>
           + 
         </mo> 
         <msub> 
          <mi>
            T 
          </mi> 
          <mrow> 
           <mi>
             i 
           </mi> 
           <mo>
             , 
           </mo> 
           <mi>
             j 
           </mi> 
           <mo>
             , 
           </mo> 
           <mi>
             v 
           </mi> 
          </mrow> 
         </msub> 
         <mrow> 
          <mo>
            ( 
          </mo> 
          <mi>
            t 
          </mi> 
          <mo>
            ) 
          </mo> 
         </mrow> 
         <mo>
           , 
         </mo> 
         <msub> 
          <mi>
            T 
          </mi> 
          <mrow> 
           <mi>
             i 
           </mi> 
           <mo>
             , 
           </mo> 
           <mi>
             j 
           </mi> 
           <mo>
             , 
           </mo> 
           <mi>
             o 
           </mi> 
           <mi>
             v 
           </mi> 
          </mrow> 
         </msub> 
         <mrow> 
          <mo>
            ( 
          </mo> 
          <mi>
            t 
          </mi> 
          <mo>
            ) 
          </mo> 
         </mrow> 
        </mrow> 
        <mo>
          ) 
        </mo> 
       </mrow> 
      </mrow> 
     </math> (7)</p>
    <p>2) Power model</p>
    <p>The battery capacity of the MEC Server is indicated as 
     <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <msubsup> 
        <mi>
          E 
        </mi> 
        <mrow> 
         <mi>
           i 
         </mi> 
         <mo>
           , 
         </mo> 
         <mi>
           k 
         </mi> 
        </mrow> 
        <mrow> 
         <mi>
           b 
         </mi> 
         <mi>
           a 
         </mi> 
         <mi>
           t 
         </mi> 
         <mi>
           t 
         </mi> 
         <mi>
           e 
         </mi> 
         <mi>
           r 
         </mi> 
         <mi>
           y 
         </mi> 
        </mrow> 
       </msubsup> 
      </mrow> 
     </math>. The MEC server consumes energy when serving end users and can be recharged with a charging efficiency of 
     <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <msubsup> 
        <mi>
          E 
        </mi> 
        <mrow> 
         <mi>
           i 
         </mi> 
         <mo>
           , 
         </mo> 
         <mi>
           k 
         </mi> 
        </mrow> 
        <mrow> 
         <mi>
           c 
         </mi> 
         <mi>
           h 
         </mi> 
         <mi>
           a 
         </mi> 
         <mi>
           r 
         </mi> 
         <mi>
           g 
         </mi> 
         <mi>
           e 
         </mi> 
        </mrow> 
       </msubsup> 
      </mrow> 
     </math>. Suppose the task selects the kth MEC server for offloading. The main components of the power consumption are as follows</p>
    <p>1) Energy consumed by the end user</p>
    <p>2) Energy consumed by the MEC server in the cell</p>
    <p>3) Power consumed by other MECs in the cell</p>
    <p>4) Power consumed by task transfer to the MEC server</p>
    <p>5) Energy consumed when the MEC receives the task.</p>
    <p>The energy consumption of the end user can be expressed as</p>
    <p>
     <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <msubsup> 
        <mi>
          E 
        </mi> 
        <mrow> 
         <mi>
           i 
         </mi> 
         <mo>
           , 
         </mo> 
         <mi>
           j 
         </mi> 
        </mrow> 
        <mi>
          L 
        </mi> 
       </msubsup> 
       <mrow> 
        <mo>
          ( 
        </mo> 
        <mi>
          t 
        </mi> 
        <mo>
          ) 
        </mo> 
       </mrow> 
       <mo>
         = 
       </mo> 
       <msubsup> 
        <mi>
          P 
        </mi> 
        <mrow> 
         <mi>
           i 
         </mi> 
         <mo>
           , 
         </mo> 
         <mi>
           j 
         </mi> 
        </mrow> 
        <mi>
          L 
        </mi> 
       </msubsup> 
       <msubsup> 
        <mi>
          T 
        </mi> 
        <mrow> 
         <mi>
           i 
         </mi> 
         <mo>
           , 
         </mo> 
         <mi>
           j 
         </mi> 
        </mrow> 
        <mi>
          L 
        </mi> 
       </msubsup> 
       <mrow> 
        <mo>
          ( 
        </mo> 
        <mi>
          t 
        </mi> 
        <mo>
          ) 
        </mo> 
       </mrow> 
      </mrow> 
     </math> (8)</p>
    <p>where 
     <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <msubsup> 
        <mi>
          P 
        </mi> 
        <mrow> 
         <mi>
           i 
         </mi> 
         <mo>
           , 
         </mo> 
         <mi>
           j 
         </mi> 
        </mrow> 
        <mi>
          L 
        </mi> 
       </msubsup> 
      </mrow> 
     </math> denotes the power of the end user.</p>
    <p>The energy consumption of the MEC server in this cell can be expressed as:</p>
    <p>
     <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <msub> 
        <mi>
          E 
        </mi> 
        <mrow> 
         <mi>
           i 
         </mi> 
         <mo>
           , 
         </mo> 
         <mi>
           j 
         </mi> 
         <mo>
           , 
         </mo> 
         <mi>
           v 
         </mi> 
        </mrow> 
       </msub> 
       <mrow> 
        <mo>
          ( 
        </mo> 
        <mi>
          t 
        </mi> 
        <mo>
          ) 
        </mo> 
       </mrow> 
       <mo>
         = 
       </mo> 
       <msub> 
        <mi>
          P 
        </mi> 
        <mrow> 
         <mi>
           i 
         </mi> 
         <mo>
           , 
         </mo> 
         <mi>
           k 
         </mi> 
         <mo>
           , 
         </mo> 
         <mi>
           v 
         </mi> 
        </mrow> 
       </msub> 
       <msub> 
        <mi>
          T 
        </mi> 
        <mrow> 
         <mi>
           i 
         </mi> 
         <mo>
           , 
         </mo> 
         <mi>
           j 
         </mi> 
         <mo>
           , 
         </mo> 
         <mi>
           v 
         </mi> 
        </mrow> 
       </msub> 
       <mrow> 
        <mo>
          ( 
        </mo> 
        <mi>
          t 
        </mi> 
        <mo>
          ) 
        </mo> 
       </mrow> 
      </mrow> 
     </math> (9)</p>
    <p>where 
     <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <msub> 
        <mi>
          P 
        </mi> 
        <mrow> 
         <mi>
           i 
         </mi> 
         <mo>
           , 
         </mo> 
         <mi>
           k 
         </mi> 
         <mo>
           , 
         </mo> 
         <mi>
           v 
         </mi> 
        </mrow> 
       </msub> 
      </mrow> 
     </math> denotes the power of the selected MEC.</p>
    <p>The energy consumption of the task transfer to the MEC server can be expressed as:</p>
    <p>
     <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <msubsup> 
        <mi>
          E 
        </mi> 
        <mrow> 
         <mi>
           i 
         </mi> 
         <mo>
           , 
         </mo> 
         <mi>
           j 
         </mi> 
        </mrow> 
        <mrow> 
         <mi>
           t 
         </mi> 
         <mi>
           r 
         </mi> 
         <mi>
           a 
         </mi> 
         <mo>
           , 
         </mo> 
         <mi>
           u 
         </mi> 
         <mi>
           p 
         </mi> 
        </mrow> 
       </msubsup> 
       <mrow> 
        <mo>
          ( 
        </mo> 
        <mi>
          t 
        </mi> 
        <mo>
          ) 
        </mo> 
       </mrow> 
       <mo>
         = 
       </mo> 
       <msubsup> 
        <mi>
          P 
        </mi> 
        <mrow> 
         <mi>
           i 
         </mi> 
         <mo>
           , 
         </mo> 
         <mi>
           j 
         </mi> 
        </mrow> 
        <mrow> 
         <mi>
           u 
         </mi> 
         <mi>
           p 
         </mi> 
        </mrow> 
       </msubsup> 
       <msubsup> 
        <mi>
          T 
        </mi> 
        <mrow> 
         <mi>
           i 
         </mi> 
         <mo>
           , 
         </mo> 
         <mi>
           j 
         </mi> 
        </mrow> 
        <mrow> 
         <mi>
           t 
         </mi> 
         <mi>
           r 
         </mi> 
         <mi>
           a 
         </mi> 
        </mrow> 
       </msubsup> 
       <mrow> 
        <mo>
          ( 
        </mo> 
        <mi>
          t 
        </mi> 
        <mo>
          ) 
        </mo> 
       </mrow> 
      </mrow> 
     </math> (10)</p>
    <p>where 
     <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <msubsup> 
        <mi>
          P 
        </mi> 
        <mrow> 
         <mi>
           i 
         </mi> 
         <mo>
           , 
         </mo> 
         <mi>
           j 
         </mi> 
        </mrow> 
        <mrow> 
         <mi>
           u 
         </mi> 
         <mi>
           p 
         </mi> 
        </mrow> 
       </msubsup> 
      </mrow> 
     </math> denotes the transmission power of the end user.</p>
    <p>The energy consumption at the time of MEC receiving task can be expressed as:</p>
    <p>
     <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <msubsup> 
        <mi>
          E 
        </mi> 
        <mrow> 
         <mi>
           i 
         </mi> 
         <mo>
           , 
         </mo> 
         <mi>
           j 
         </mi> 
        </mrow> 
        <mrow> 
         <mi>
           t 
         </mi> 
         <mi>
           r 
         </mi> 
         <mi>
           a 
         </mi> 
         <mo>
           , 
         </mo> 
         <mi>
           d 
         </mi> 
         <mi>
           o 
         </mi> 
         <mi>
           w 
         </mi> 
         <mi>
           n 
         </mi> 
        </mrow> 
       </msubsup> 
       <mrow> 
        <mo>
          ( 
        </mo> 
        <mi>
          t 
        </mi> 
        <mo>
          ) 
        </mo> 
       </mrow> 
       <mo>
         = 
       </mo> 
       <msubsup> 
        <mi>
          P 
        </mi> 
        <mrow> 
         <mi>
           i 
         </mi> 
         <mo>
           , 
         </mo> 
         <mi>
           k 
         </mi> 
        </mrow> 
        <mrow> 
         <mi>
           d 
         </mi> 
         <mi>
           o 
         </mi> 
         <mi>
           w 
         </mi> 
         <mi>
           n 
         </mi> 
        </mrow> 
       </msubsup> 
       <msubsup> 
        <mi>
          T 
        </mi> 
        <mrow> 
         <mi>
           i 
         </mi> 
         <mo>
           , 
         </mo> 
         <mi>
           j 
         </mi> 
        </mrow> 
        <mrow> 
         <mi>
           t 
         </mi> 
         <mi>
           r 
         </mi> 
         <mi>
           a 
         </mi> 
        </mrow> 
       </msubsup> 
       <mrow> 
        <mo>
          ( 
        </mo> 
        <mi>
          t 
        </mi> 
        <mo>
          ) 
        </mo> 
       </mrow> 
      </mrow> 
     </math> (11)</p>
    <p>In terms of the MEC charging model, the residual of MEC at moment t can be expressed as:</p>
    <p>
     <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <msubsup> 
        <mi>
          E 
        </mi> 
        <mrow> 
         <mi>
           i 
         </mi> 
         <mo>
           , 
         </mo> 
         <mi>
           k 
         </mi> 
        </mrow> 
        <mi>
          r 
        </mi> 
       </msubsup> 
       <mrow> 
        <mo>
          ( 
        </mo> 
        <mi>
          t 
        </mi> 
        <mo>
          ) 
        </mo> 
       </mrow> 
       <mo>
         = 
       </mo> 
       <mrow> 
        <mo>
          { 
        </mo> 
        <mtable columnalign="left"> 
         <mtr> 
          <mtd> 
           <msubsup> 
            <mi>
              E 
            </mi> 
            <mrow> 
             <mi>
               i 
             </mi> 
             <mo>
               , 
             </mo> 
             <mi>
               j 
             </mi> 
            </mrow> 
            <mi>
              v 
            </mi> 
           </msubsup> 
           <mrow> 
            <mo>
              ( 
            </mo> 
            <mi>
              t 
            </mi> 
            <mo>
              ) 
            </mo> 
           </mrow> 
           <mo>
             , 
           </mo> 
           <mi> 
           </mi> 
           <mi> 
           </mi> 
           <mi> 
           </mi> 
           <mi> 
           </mi> 
           <mi> 
           </mi> 
           <msubsup> 
            <mi>
              E 
            </mi> 
            <mrow> 
             <mi>
               i 
             </mi> 
             <mo>
               , 
             </mo> 
             <mi>
               j 
             </mi> 
            </mrow> 
            <mi>
              v 
            </mi> 
           </msubsup> 
           <mrow> 
            <mo>
              ( 
            </mo> 
            <mi>
              t 
            </mi> 
            <mo>
              ) 
            </mo> 
           </mrow> 
           <mo>
             ≤ 
           </mo> 
           <msubsup> 
            <mi>
              E 
            </mi> 
            <mrow> 
             <mi>
               i 
             </mi> 
             <mo>
               , 
             </mo> 
             <mi>
               k 
             </mi> 
            </mrow> 
            <mrow> 
             <mi>
               b 
             </mi> 
             <mi>
               a 
             </mi> 
             <mi>
               t 
             </mi> 
             <mi>
               t 
             </mi> 
             <mi>
               e 
             </mi> 
             <mi>
               r 
             </mi> 
             <mi>
               y 
             </mi> 
            </mrow> 
           </msubsup> 
          </mtd> 
         </mtr> 
         <mtr> 
          <mtd> 
           <msubsup> 
            <mi>
              E 
            </mi> 
            <mrow> 
             <mi>
               i 
             </mi> 
             <mo>
               , 
             </mo> 
             <mi>
               k 
             </mi> 
            </mrow> 
            <mrow> 
             <mi>
               b 
             </mi> 
             <mi>
               a 
             </mi> 
             <mi>
               t 
             </mi> 
             <mi>
               t 
             </mi> 
             <mi>
               e 
             </mi> 
             <mi>
               r 
             </mi> 
             <mi>
               y 
             </mi> 
            </mrow> 
           </msubsup> 
           <mo>
             , 
           </mo> 
           <mi> 
           </mi> 
           <mi> 
           </mi> 
           <mi> 
           </mi> 
           <mi> 
           </mi> 
           <mi> 
           </mi> 
           <msubsup> 
            <mi>
              E 
            </mi> 
            <mrow> 
             <mi>
               i 
             </mi> 
             <mo>
               , 
             </mo> 
             <mi>
               k 
             </mi> 
            </mrow> 
            <mrow> 
             <mi>
               b 
             </mi> 
             <mi>
               a 
             </mi> 
             <mi>
               t 
             </mi> 
             <mi>
               t 
             </mi> 
             <mi>
               e 
             </mi> 
             <mi>
               r 
             </mi> 
             <mi>
               y 
             </mi> 
            </mrow> 
           </msubsup> 
           <mo>
             &gt; 
           </mo> 
           <msubsup> 
            <mi>
              E 
            </mi> 
            <mrow> 
             <mi>
               i 
             </mi> 
             <mo>
               , 
             </mo> 
             <mi>
               j 
             </mi> 
            </mrow> 
            <mi>
              v 
            </mi> 
           </msubsup> 
           <mrow> 
            <mo>
              ( 
            </mo> 
            <mi>
              t 
            </mi> 
            <mo>
              ) 
            </mo> 
           </mrow> 
          </mtd> 
         </mtr> 
        </mtable> 
       </mrow> 
      </mrow> 
     </math> (12)</p>
    <p>Among others,</p>
    <p>
     <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <msubsup> 
        <mi>
          E 
        </mi> 
        <mrow> 
         <mi>
           i 
         </mi> 
         <mo>
           , 
         </mo> 
         <mi>
           j 
         </mi> 
        </mrow> 
        <mi>
          v 
        </mi> 
       </msubsup> 
       <mrow> 
        <mo>
          ( 
        </mo> 
        <mi>
          t 
        </mi> 
        <mo>
          ) 
        </mo> 
       </mrow> 
       <mo>
         = 
       </mo> 
       <msubsup> 
        <mi>
          E 
        </mi> 
        <mrow> 
         <mi>
           i 
         </mi> 
         <mo>
           , 
         </mo> 
         <mi>
           k 
         </mi> 
        </mrow> 
        <mi>
          r 
        </mi> 
       </msubsup> 
       <mrow> 
        <mo>
          ( 
        </mo> 
        <mrow> 
         <mi>
           t 
         </mi> 
         <mo>
           − 
         </mo> 
         <mn>
           1 
         </mn> 
        </mrow> 
        <mo>
          ) 
        </mo> 
       </mrow> 
       <mo>
         − 
       </mo> 
       <msubsup> 
        <mi>
          E 
        </mi> 
        <mrow> 
         <mi>
           i 
         </mi> 
         <mo>
           , 
         </mo> 
         <mi>
           j 
         </mi> 
        </mrow> 
        <mrow> 
         <mi>
           t 
         </mi> 
         <mi>
           r 
         </mi> 
         <mi>
           a 
         </mi> 
         <mo>
           , 
         </mo> 
         <mi>
           d 
         </mi> 
         <mi>
           o 
         </mi> 
         <mi>
           w 
         </mi> 
         <mi>
           n 
         </mi> 
        </mrow> 
       </msubsup> 
       <mrow> 
        <mo>
          ( 
        </mo> 
        <mrow> 
         <mi>
           t 
         </mi> 
         <mo>
           − 
         </mo> 
         <mn>
           1 
         </mn> 
        </mrow> 
        <mo>
          ) 
        </mo> 
       </mrow> 
       <mo>
         − 
       </mo> 
       <msub> 
        <mi>
          E 
        </mi> 
        <mrow> 
         <mi>
           i 
         </mi> 
         <mo>
           , 
         </mo> 
         <mi>
           j 
         </mi> 
         <mo>
           , 
         </mo> 
         <mi>
           v 
         </mi> 
        </mrow> 
       </msub> 
       <mrow> 
        <mo>
          ( 
        </mo> 
        <mi>
          t 
        </mi> 
        <mo>
          ) 
        </mo> 
       </mrow> 
       <mo>
         + 
       </mo> 
       <msubsup> 
        <mi>
          E 
        </mi> 
        <mrow> 
         <mi>
           i 
         </mi> 
         <mo>
           , 
         </mo> 
         <mi>
           k 
         </mi> 
        </mrow> 
        <mrow> 
         <mi>
           c 
         </mi> 
         <mi>
           h 
         </mi> 
         <mi>
           a 
         </mi> 
         <mi>
           r 
         </mi> 
         <mi>
           g 
         </mi> 
         <mi>
           e 
         </mi> 
        </mrow> 
       </msubsup> 
      </mrow> 
     </math> (13)</p>
    <p>In summary, the total energy consumption of this system can be expressed as:</p>
    <p>
     <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <mi>
         E 
       </mi> 
       <mrow> 
        <mo>
          ( 
        </mo> 
        <mi>
          t 
        </mi> 
        <mo>
          ) 
        </mo> 
       </mrow> 
       <mo>
         = 
       </mo> 
       <mstyle displaystyle="true"> 
        <munderover> 
         <mo>
           ∑ 
         </mo> 
         <mrow> 
          <mi>
            i 
          </mi> 
          <mo>
            = 
          </mo> 
          <mn>
            1 
          </mn> 
         </mrow> 
         <mi>
           s 
         </mi> 
        </munderover> 
        <mrow> 
         <mstyle displaystyle="true"> 
          <munderover> 
           <mo>
             ∑ 
           </mo> 
           <mrow> 
            <mi>
              j 
            </mi> 
            <mo>
              = 
            </mo> 
            <mn>
              1 
            </mn> 
           </mrow> 
           <mi>
             b 
           </mi> 
          </munderover> 
          <mrow> 
           <msubsup> 
            <mi>
              E 
            </mi> 
            <mrow> 
             <mi>
               i 
             </mi> 
             <mo>
               , 
             </mo> 
             <mi>
               j 
             </mi> 
            </mrow> 
            <mrow> 
             <mi>
               t 
             </mi> 
             <mi>
               r 
             </mi> 
             <mi>
               a 
             </mi> 
             <mo>
               , 
             </mo> 
             <mi>
               d 
             </mi> 
             <mi>
               o 
             </mi> 
             <mi>
               w 
             </mi> 
             <mi>
               n 
             </mi> 
            </mrow> 
           </msubsup> 
           <mrow> 
            <mo>
              ( 
            </mo> 
            <mi>
              t 
            </mi> 
            <mo>
              ) 
            </mo> 
           </mrow> 
           <mo>
             + 
           </mo> 
           <msubsup> 
            <mi>
              E 
            </mi> 
            <mrow> 
             <mi>
               i 
             </mi> 
             <mo>
               , 
             </mo> 
             <mi>
               j 
             </mi> 
            </mrow> 
            <mrow> 
             <mi>
               t 
             </mi> 
             <mi>
               r 
             </mi> 
             <mi>
               a 
             </mi> 
             <mo>
               , 
             </mo> 
             <mi>
               u 
             </mi> 
             <mi>
               p 
             </mi> 
            </mrow> 
           </msubsup> 
           <mrow> 
            <mo>
              ( 
            </mo> 
            <mi>
              t 
            </mi> 
            <mo>
              ) 
            </mo> 
           </mrow> 
           <mo>
             + 
           </mo> 
           <msub> 
            <mi>
              E 
            </mi> 
            <mrow> 
             <mi>
               i 
             </mi> 
             <mo>
               , 
             </mo> 
             <mi>
               j 
             </mi> 
             <mo>
               , 
             </mo> 
             <mi>
               o 
             </mi> 
             <mi>
               v 
             </mi> 
            </mrow> 
           </msub> 
           <mrow> 
            <mo>
              ( 
            </mo> 
            <mi>
              t 
            </mi> 
            <mo>
              ) 
            </mo> 
           </mrow> 
           <mo>
             + 
           </mo> 
           <msub> 
            <mi>
              E 
            </mi> 
            <mrow> 
             <mi>
               i 
             </mi> 
             <mo>
               , 
             </mo> 
             <mi>
               j 
             </mi> 
             <mo>
               , 
             </mo> 
             <mi>
               v 
             </mi> 
            </mrow> 
           </msub> 
           <mrow> 
            <mo>
              ( 
            </mo> 
            <mi>
              t 
            </mi> 
            <mo>
              ) 
            </mo> 
           </mrow> 
           <mo>
             + 
           </mo> 
           <msubsup> 
            <mi>
              E 
            </mi> 
            <mrow> 
             <mi>
               i 
             </mi> 
             <mo>
               , 
             </mo> 
             <mi>
               j 
             </mi> 
            </mrow> 
            <mi>
              L 
            </mi> 
           </msubsup> 
           <mrow> 
            <mo>
              ( 
            </mo> 
            <mi>
              t 
            </mi> 
            <mo>
              ) 
            </mo> 
           </mrow> 
          </mrow> 
         </mstyle> 
        </mrow> 
       </mstyle> 
      </mrow> 
     </math> (14)</p>
    <p>3) MEC storage model</p>
    <p>In this paper, we consider a type of MEC server with limited memory resources. However, the offload rate of tasks transmitted from other users to other cells is 0. Therefore, the residual power of the MEC at time slot t can be expressed as follows:</p>
    <p>
     <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <msubsup> 
        <mi>
          M 
        </mi> 
        <mrow> 
         <mi>
           i 
         </mi> 
         <mo>
           , 
         </mo> 
         <mi>
           k 
         </mi> 
        </mrow> 
        <mi>
          r 
        </mi> 
       </msubsup> 
       <mrow> 
        <mo>
          ( 
        </mo> 
        <mi>
          t 
        </mi> 
        <mo>
          ) 
        </mo> 
       </mrow> 
       <mo>
         = 
       </mo> 
       <mrow> 
        <mo>
          { 
        </mo> 
        <mtable columnalign="left"> 
         <mtr> 
          <mtd> 
           <msubsup> 
            <mi>
              M 
            </mi> 
            <mrow> 
             <mi>
               i 
             </mi> 
             <mo>
               , 
             </mo> 
             <mi>
               k 
             </mi> 
            </mrow> 
            <mrow> 
             <mi>
               m 
             </mi> 
             <mi>
               e 
             </mi> 
             <mi>
               m 
             </mi> 
             <mi>
               o 
             </mi> 
             <mi>
               r 
             </mi> 
             <mi>
               y 
             </mi> 
            </mrow> 
           </msubsup> 
           <mo>
             , 
           </mo> 
          </mtd> 
         </mtr> 
         <mtr> 
          <mtd> 
           <msubsup> 
            <mi>
              M 
            </mi> 
            <mrow> 
             <mi>
               i 
             </mi> 
             <mo>
               , 
             </mo> 
             <mi>
               k 
             </mi> 
            </mrow> 
            <mi>
              r 
            </mi> 
           </msubsup> 
           <mrow> 
            <mo>
              ( 
            </mo> 
            <mi>
              t 
            </mi> 
            <mo>
              ) 
            </mo> 
           </mrow> 
           <mo>
             , 
           </mo> 
           <mi> 
           </mi> 
           <mi> 
           </mi> 
           <mi> 
           </mi> 
           <mi> 
           </mi> 
           <msubsup> 
            <mi>
              M 
            </mi> 
            <mrow> 
             <mi>
               i 
             </mi> 
             <mo>
               , 
             </mo> 
             <mi>
               k 
             </mi> 
            </mrow> 
            <mi>
              r 
            </mi> 
           </msubsup> 
           <mrow> 
            <mo>
              ( 
            </mo> 
            <mi>
              t 
            </mi> 
            <mo>
              ) 
            </mo> 
           </mrow> 
           <mo>
             ≤ 
           </mo> 
           <msubsup> 
            <mi>
              M 
            </mi> 
            <mrow> 
             <mi>
               i 
             </mi> 
             <mo>
               , 
             </mo> 
             <mi>
               k 
             </mi> 
            </mrow> 
            <mrow> 
             <mi>
               m 
             </mi> 
             <mi>
               e 
             </mi> 
             <mi>
               m 
             </mi> 
             <mi>
               o 
             </mi> 
             <mi>
               r 
             </mi> 
             <mi>
               y 
             </mi> 
            </mrow> 
           </msubsup> 
          </mtd> 
         </mtr> 
        </mtable> 
       </mrow> 
      </mrow> 
     </math> (15)</p>
    <p>Among others,</p>
    <p>
     <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <msubsup> 
        <mi>
          M 
        </mi> 
        <mrow> 
         <mi>
           i 
         </mi> 
         <mo>
           , 
         </mo> 
         <mi>
           k 
         </mi> 
        </mrow> 
        <mi>
          r 
        </mi> 
       </msubsup> 
       <mrow> 
        <mo>
          ( 
        </mo> 
        <mi>
          t 
        </mi> 
        <mo>
          ) 
        </mo> 
       </mrow> 
       <mo>
         = 
       </mo> 
       <msubsup> 
        <mi>
          M 
        </mi> 
        <mrow> 
         <mi>
           i 
         </mi> 
         <mo>
           , 
         </mo> 
         <mi>
           k 
         </mi> 
        </mrow> 
        <mi>
          r 
        </mi> 
       </msubsup> 
       <mrow> 
        <mo>
          ( 
        </mo> 
        <mrow> 
         <mi>
           t 
         </mi> 
         <mo>
           − 
         </mo> 
         <mn>
           1 
         </mn> 
        </mrow> 
        <mo>
          ) 
        </mo> 
       </mrow> 
       <mo>
         − 
       </mo> 
       <mrow> 
        <mo>
          ( 
        </mo> 
        <mrow> 
         <mn>
           1 
         </mn> 
         <mo>
           − 
         </mo> 
         <msubsup> 
          <mi>
            R 
          </mi> 
          <mrow> 
           <mi>
             i 
           </mi> 
           <mo>
             , 
           </mo> 
           <mi>
             j 
           </mi> 
          </mrow> 
          <mrow> 
           <mi>
             r 
           </mi> 
           <mi>
             s 
           </mi> 
          </mrow> 
         </msubsup> 
         <mrow> 
          <mo>
            ( 
          </mo> 
          <mi>
            t 
          </mi> 
          <mo>
            ) 
          </mo> 
         </mrow> 
        </mrow> 
        <mo>
          ) 
        </mo> 
       </mrow> 
       <msubsup> 
        <mi>
          R 
        </mi> 
        <mrow> 
         <mi>
           i 
         </mi> 
         <mo>
           , 
         </mo> 
         <mi>
           j 
         </mi> 
        </mrow> 
        <mrow> 
         <mi>
           r 
         </mi> 
         <mi>
           m 
         </mi> 
        </mrow> 
       </msubsup> 
       <mrow> 
        <mo>
          ( 
        </mo> 
        <mi>
          t 
        </mi> 
        <mo>
          ) 
        </mo> 
       </mrow> 
       <msub> 
        <mi>
          c 
        </mi> 
        <mrow> 
         <mi>
           i 
         </mi> 
         <mo>
           , 
         </mo> 
         <mi>
           j 
         </mi> 
        </mrow> 
       </msub> 
       <mrow> 
        <mo>
          ( 
        </mo> 
        <mi>
          t 
        </mi> 
        <mo>
          ) 
        </mo> 
       </mrow> 
       <mo>
         + 
       </mo> 
       <mstyle displaystyle="true"> 
        <munderover> 
         <mo>
           ∑ 
         </mo> 
         <mrow> 
          <mi>
            j 
          </mi> 
          <mo>
            = 
          </mo> 
          <mn>
            1 
          </mn> 
         </mrow> 
         <mi>
           b 
         </mi> 
        </munderover> 
        <mrow> 
         <msub> 
          <mi>
            θ 
          </mi> 
          <mrow> 
           <mi>
             i 
           </mi> 
           <mo>
             , 
           </mo> 
           <mi>
             j 
           </mi> 
          </mrow> 
         </msub> 
        </mrow> 
       </mstyle> 
       <msub> 
        <mi>
          f 
        </mi> 
        <mrow> 
         <mi>
           i 
         </mi> 
         <mo>
           , 
         </mo> 
         <mi>
           k 
         </mi> 
        </mrow> 
       </msub> 
       <mi>
         s 
       </mi> 
       <mi>
         t 
       </mi> 
      </mrow> 
     </math> (16)</p>
   </sec>
   <sec id="s2_2">
    <title>
     <xref ref-type="bibr" rid="scirp.134131-"></xref>2.2. Problem Description</title>
    <p>In this paper, we study the optimisation objective of minimising the weighted sum of the system energy consumption and the average delay of the users. The joint optimisation problem can be expressed as:</p>
    <p>
     <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <munder> 
        <mrow> 
         <mi>
           min 
         </mi> 
        </mrow> 
        <mrow> 
         <msub> 
          <mi>
            θ 
          </mi> 
          <mrow> 
           <mi>
             i 
           </mi> 
           <mo>
             , 
           </mo> 
           <mi>
             j 
           </mi> 
          </mrow> 
         </msub> 
         <mrow> 
          <mo>
            ( 
          </mo> 
          <mi>
            t 
          </mi> 
          <mo>
            ) 
          </mo> 
         </mrow> 
         <mo>
           , 
         </mo> 
         <msub> 
          <msup> 
           <mi>
             θ 
           </mi> 
           <mo>
             ′ 
           </mo> 
          </msup> 
          <mrow> 
           <mi>
             i 
           </mi> 
           <mo>
             , 
           </mo> 
           <mi>
             j 
           </mi> 
          </mrow> 
         </msub> 
         <mrow> 
          <mo>
            ( 
          </mo> 
          <mi>
            t 
          </mi> 
          <mo>
            ) 
          </mo> 
         </mrow> 
         <mo>
           , 
         </mo> 
         <msubsup> 
          <mi>
            R 
          </mi> 
          <mrow> 
           <mi>
             i 
           </mi> 
           <mo>
             , 
           </mo> 
           <mi>
             j 
           </mi> 
          </mrow> 
          <mi>
            m 
          </mi> 
         </msubsup> 
         <mrow> 
          <mo>
            ( 
          </mo> 
          <mi>
            t 
          </mi> 
          <mo>
            ) 
          </mo> 
         </mrow> 
         <mo>
           , 
         </mo> 
         <msubsup> 
          <mi>
            R 
          </mi> 
          <mrow> 
           <mi>
             i 
           </mi> 
           <mo>
             , 
           </mo> 
           <mi>
             j 
           </mi> 
          </mrow> 
          <mrow> 
           <mi>
             r 
           </mi> 
           <mi>
             s 
           </mi> 
          </mrow> 
         </msubsup> 
         <mrow> 
          <mo>
            ( 
          </mo> 
          <mi>
            t 
          </mi> 
          <mo>
            ) 
          </mo> 
         </mrow> 
         <mo>
           , 
         </mo> 
         <msubsup> 
          <mi>
            R 
          </mi> 
          <mrow> 
           <mi>
             i 
           </mi> 
           <mo>
             , 
           </mo> 
           <mi>
             j 
           </mi> 
          </mrow> 
          <mrow> 
           <mi>
             i 
           </mi> 
           <mi>
             s 
           </mi> 
           <mi>
             m 
           </mi> 
          </mrow> 
         </msubsup> 
         <mrow> 
          <mo>
            ( 
          </mo> 
          <mi>
            t 
          </mi> 
          <mo>
            ) 
          </mo> 
         </mrow> 
         <mo>
           , 
         </mo> 
         <msubsup> 
          <mi>
            R 
          </mi> 
          <mrow> 
           <mi>
             i 
           </mi> 
           <mo>
             , 
           </mo> 
           <mi>
             j 
           </mi> 
          </mrow> 
          <mrow> 
           <mi>
             i 
           </mi> 
           <mi>
             s 
           </mi> 
           <mi>
             s 
           </mi> 
          </mrow> 
         </msubsup> 
         <mrow> 
          <mo>
            ( 
          </mo> 
          <mi>
            t 
          </mi> 
          <mo>
            ) 
          </mo> 
         </mrow> 
         <mo>
           , 
         </mo> 
         <mi> 
         </mi> 
         <mi>
           t 
         </mi> 
         <mo>
           ∈ 
         </mo> 
         <mi>
           T 
         </mi> 
        </mrow> 
       </munder> 
       <mstyle displaystyle="true"> 
        <mo>
          ∑ 
        </mo> 
        <mrow> 
         <msub> 
          <mi>
            ρ 
          </mi> 
          <mn>
            1 
          </mn> 
         </msub> 
         <mi>
           E 
         </mi> 
         <mrow> 
          <mo>
            ( 
          </mo> 
          <mi>
            t 
          </mi> 
          <mo>
            ) 
          </mo> 
         </mrow> 
         <mo>
           + 
         </mo> 
         <msub> 
          <mi>
            ρ 
          </mi> 
          <mn>
            2 
          </mn> 
         </msub> 
         <mi>
           T 
         </mi> 
         <mrow> 
          <mo>
            ( 
          </mo> 
          <mi>
            t 
          </mi> 
          <mo>
            ) 
          </mo> 
         </mrow> 
        </mrow> 
       </mstyle> 
      </mrow> 
     </math> (17)</p>
    <p>
     <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <mtext>
         s 
       </mtext> 
       <mtext>
         .t 
       </mtext> 
       <mtext>
         . 
       </mtext> 
       <mi> 
       </mi> 
       <mtext>
           
       </mtext> 
       <mrow> 
        <mo>
          [ 
        </mo> 
        <mrow> 
         <mn>
           0 
         </mn> 
         <mo>
           , 
         </mo> 
         <mn>
           0 
         </mn> 
        </mrow> 
        <mo>
          ] 
        </mo> 
       </mrow> 
       <mo>
         ≤ 
       </mo> 
       <msub> 
        <mi>
          L 
        </mi> 
        <mrow> 
         <msub> 
          <mi>
            u 
          </mi> 
          <mrow> 
           <mi>
             i 
           </mi> 
           <mo>
             , 
           </mo> 
           <mi>
             j 
           </mi> 
          </mrow> 
         </msub> 
        </mrow> 
       </msub> 
       <mrow> 
        <mo>
          ( 
        </mo> 
        <mi>
          t 
        </mi> 
        <mo>
          ) 
        </mo> 
       </mrow> 
       <mo>
         ≤ 
       </mo> 
       <mrow> 
        <mo>
          [ 
        </mo> 
        <mrow> 
         <msub> 
          <mi>
            L 
          </mi> 
          <mrow> 
           <mi>
             m 
           </mi> 
           <mi>
             a 
           </mi> 
           <mi>
             x 
           </mi> 
           <mo>
             , 
           </mo> 
           <mi>
             x 
           </mi> 
          </mrow> 
         </msub> 
         <mo>
           , 
         </mo> 
         <msub> 
          <mi>
            L 
          </mi> 
          <mrow> 
           <mi>
             m 
           </mi> 
           <mi>
             a 
           </mi> 
           <mi>
             x 
           </mi> 
           <mo>
             , 
           </mo> 
           <mi>
             y 
           </mi> 
          </mrow> 
         </msub> 
        </mrow> 
        <mo>
          ] 
        </mo> 
       </mrow> 
      </mrow> 
     </math> (18)</p>
    <p>
     <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <mn>
         0 
       </mn> 
       <mo>
         ≤ 
       </mo> 
       <msubsup> 
        <mi>
          E 
        </mi> 
        <mrow> 
         <mi>
           i 
         </mi> 
         <mo>
           , 
         </mo> 
         <mi>
           k 
         </mi> 
        </mrow> 
        <mi>
          r 
        </mi> 
       </msubsup> 
       <mrow> 
        <mo>
          ( 
        </mo> 
        <mi>
          t 
        </mi> 
        <mo>
          ) 
        </mo> 
       </mrow> 
       <mo>
         ≤ 
       </mo> 
       <msubsup> 
        <mi>
          E 
        </mi> 
        <mrow> 
         <mi>
           i 
         </mi> 
         <mo>
           , 
         </mo> 
         <mi>
           k 
         </mi> 
        </mrow> 
        <mrow> 
         <mi>
           b 
         </mi> 
         <mi>
           a 
         </mi> 
         <mi>
           t 
         </mi> 
         <mi>
           t 
         </mi> 
         <mi>
           e 
         </mi> 
         <mi>
           r 
         </mi> 
         <mi>
           y 
         </mi> 
        </mrow> 
       </msubsup> 
      </mrow> 
     </math> (19)</p>
    <p>
     <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <mn>
         1 
       </mn> 
       <mo>
         ≤ 
       </mo> 
       <msub> 
        <mi>
          R 
        </mi> 
        <mrow> 
         <mi>
           i 
         </mi> 
         <mi>
           s 
         </mi> 
         <mi>
           m 
         </mi> 
        </mrow> 
       </msub> 
       <mrow> 
        <mo>
          ( 
        </mo> 
        <mi>
          t 
        </mi> 
        <mo>
          ) 
        </mo> 
       </mrow> 
       <mo>
         ≤ 
       </mo> 
       <mi>
         m 
       </mi> 
       <mo>
         , 
       </mo> 
       <mi> 
       </mi> 
       <mi> 
       </mi> 
       <msub> 
        <mi>
          R 
        </mi> 
        <mrow> 
         <mi>
           i 
         </mi> 
         <mi>
           s 
         </mi> 
         <mi>
           m 
         </mi> 
        </mrow> 
       </msub> 
       <mrow> 
        <mo>
          ( 
        </mo> 
        <mi>
          t 
        </mi> 
        <mo>
          ) 
        </mo> 
       </mrow> 
       <mo>
         ∈ 
       </mo> 
       <mi>
         R 
       </mi> 
       <mo>
         , 
       </mo> 
       <mi> 
       </mi> 
       <mi> 
       </mi> 
       <mi> 
       </mi> 
       <mi> 
       </mi> 
       <mn>
         0 
       </mn> 
       <mo>
         ≤ 
       </mo> 
       <msub> 
        <mi>
          R 
        </mi> 
        <mrow> 
         <mi>
           r 
         </mi> 
         <mi>
           m 
         </mi> 
        </mrow> 
       </msub> 
       <mrow> 
        <mo>
          ( 
        </mo> 
        <mi>
          t 
        </mi> 
        <mo>
          ) 
        </mo> 
       </mrow> 
       <mo>
         ≤ 
       </mo> 
       <mn>
         1 
       </mn> 
      </mrow> 
     </math> (20)</p>
    <p>
     <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <mn>
         1 
       </mn> 
       <mo>
         ≤ 
       </mo> 
       <msub> 
        <mi>
          R 
        </mi> 
        <mrow> 
         <mi>
           i 
         </mi> 
         <mi>
           s 
         </mi> 
         <mi>
           s 
         </mi> 
        </mrow> 
       </msub> 
       <mrow> 
        <mo>
          ( 
        </mo> 
        <mi>
          t 
        </mi> 
        <mo>
          ) 
        </mo> 
       </mrow> 
       <mo>
         ≤ 
       </mo> 
       <mi>
         s 
       </mi> 
       <mo>
         , 
       </mo> 
       <mi> 
       </mi> 
       <mi> 
       </mi> 
       <msub> 
        <mi>
          R 
        </mi> 
        <mrow> 
         <mi>
           i 
         </mi> 
         <mi>
           s 
         </mi> 
         <mi>
           s 
         </mi> 
        </mrow> 
       </msub> 
       <mrow> 
        <mo>
          ( 
        </mo> 
        <mi>
          t 
        </mi> 
        <mo>
          ) 
        </mo> 
       </mrow> 
       <mo>
         ∈ 
       </mo> 
       <mi>
         R 
       </mi> 
       <mo>
         , 
       </mo> 
       <mi> 
       </mi> 
       <mi> 
       </mi> 
       <mi> 
       </mi> 
       <mi> 
       </mi> 
       <mn>
         0 
       </mn> 
       <mo>
         ≤ 
       </mo> 
       <msub> 
        <mi>
          R 
        </mi> 
        <mrow> 
         <mi>
           r 
         </mi> 
         <mi>
           s 
         </mi> 
        </mrow> 
       </msub> 
       <mrow> 
        <mo>
          ( 
        </mo> 
        <mi>
          t 
        </mi> 
        <mo>
          ) 
        </mo> 
       </mrow> 
       <mo>
         ≤ 
       </mo> 
       <mn>
         1 
       </mn> 
      </mrow> 
     </math> (21)</p>
    <p>
     <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <mn>
         0 
       </mn> 
       <mo>
         ≤ 
       </mo> 
       <msubsup> 
        <mi>
          M 
        </mi> 
        <mrow> 
         <mi>
           i 
         </mi> 
         <mo>
           , 
         </mo> 
         <mi>
           k 
         </mi> 
        </mrow> 
        <mi>
          r 
        </mi> 
       </msubsup> 
       <mrow> 
        <mo>
          ( 
        </mo> 
        <mi>
          t 
        </mi> 
        <mo>
          ) 
        </mo> 
       </mrow> 
       <mo>
         ≤ 
       </mo> 
       <msubsup> 
        <mi>
          M 
        </mi> 
        <mrow> 
         <mi>
           i 
         </mi> 
         <mo>
           , 
         </mo> 
         <mi>
           k 
         </mi> 
        </mrow> 
        <mrow> 
         <mi>
           m 
         </mi> 
         <mi>
           e 
         </mi> 
         <mi>
           m 
         </mi> 
         <mi>
           o 
         </mi> 
         <mi>
           r 
         </mi> 
         <mi>
           y 
         </mi> 
        </mrow> 
       </msubsup> 
      </mrow> 
     </math> (22)</p>
    <p>
     <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <mn>
         0 
       </mn> 
       <mo>
         ≤ 
       </mo> 
       <msub> 
        <mi>
          θ 
        </mi> 
        <mrow> 
         <mi>
           i 
         </mi> 
         <mo>
           , 
         </mo> 
         <mi>
           j 
         </mi> 
        </mrow> 
       </msub> 
       <mrow> 
        <mo>
          ( 
        </mo> 
        <mi>
          t 
        </mi> 
        <mo>
          ) 
        </mo> 
       </mrow> 
       <mo>
         ≤ 
       </mo> 
       <mn>
         1 
       </mn> 
       <mo>
         , 
       </mo> 
       <mtext>
           
       </mtext> 
       <mstyle displaystyle="true"> 
        <munderover> 
         <mo>
           ∑ 
         </mo> 
         <mrow> 
          <mi>
            j 
          </mi> 
          <mo>
            = 
          </mo> 
          <mn>
            1 
          </mn> 
         </mrow> 
         <mi>
           b 
         </mi> 
        </munderover> 
        <mrow> 
         <msub> 
          <mi>
            θ 
          </mi> 
          <mrow> 
           <mi>
             i 
           </mi> 
           <mo>
             , 
           </mo> 
           <mi>
             j 
           </mi> 
          </mrow> 
         </msub> 
         <mrow> 
          <mo>
            ( 
          </mo> 
          <mi>
            t 
          </mi> 
          <mo>
            ) 
          </mo> 
         </mrow> 
        </mrow> 
       </mstyle> 
       <mo>
         ≤ 
       </mo> 
       <mn>
         1 
       </mn> 
      </mrow> 
     </math> (23)</p>
    <p>
     <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <mn>
         0 
       </mn> 
       <mo>
         ≤ 
       </mo> 
       <msub> 
        <msup> 
         <mi>
           θ 
         </mi> 
         <mo>
           ′ 
         </mo> 
        </msup> 
        <mrow> 
         <mi>
           i 
         </mi> 
         <mo>
           , 
         </mo> 
         <mi>
           j 
         </mi> 
        </mrow> 
       </msub> 
       <mrow> 
        <mo>
          ( 
        </mo> 
        <mi>
          t 
        </mi> 
        <mo>
          ) 
        </mo> 
       </mrow> 
       <mo>
         ≤ 
       </mo> 
       <mn>
         1 
       </mn> 
       <mo>
         , 
       </mo> 
       <mtext>
           
       </mtext> 
       <mstyle displaystyle="true"> 
        <munderover> 
         <mo>
           ∑ 
         </mo> 
         <mrow> 
          <mi>
            j 
          </mi> 
          <mo>
            = 
          </mo> 
          <mn>
            1 
          </mn> 
         </mrow> 
         <mi>
           b 
         </mi> 
        </munderover> 
        <mrow> 
         <msub> 
          <msup> 
           <mi>
             θ 
           </mi> 
           <mo>
             ′ 
           </mo> 
          </msup> 
          <mrow> 
           <mi>
             i 
           </mi> 
           <mo>
             , 
           </mo> 
           <mi>
             j 
           </mi> 
          </mrow> 
         </msub> 
         <mrow> 
          <mo>
            ( 
          </mo> 
          <mi>
            t 
          </mi> 
          <mo>
            ) 
          </mo> 
         </mrow> 
        </mrow> 
       </mstyle> 
       <mo>
         ≤ 
       </mo> 
       <mn>
         1 
       </mn> 
      </mrow> 
     </math> (24)</p>
    <p>
     <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <msub> 
        <mi>
          T 
        </mi> 
        <mrow> 
         <mi>
           i 
         </mi> 
         <mo>
           , 
         </mo> 
         <mi>
           j 
         </mi> 
        </mrow> 
       </msub> 
       <mrow> 
        <mo>
          ( 
        </mo> 
        <mi>
          t 
        </mi> 
        <mo>
          ) 
        </mo> 
       </mrow> 
       <mo>
         ≤ 
       </mo> 
       <msub> 
        <mi>
          T 
        </mi> 
        <mrow> 
         <mi>
           i 
         </mi> 
         <mo>
           , 
         </mo> 
         <mi>
           j 
         </mi> 
         <mo>
           , 
         </mo> 
         <mi>
           m 
         </mi> 
         <mi>
           a 
         </mi> 
         <mi>
           x 
         </mi> 
        </mrow> 
       </msub> 
       <mrow> 
        <mo>
          ( 
        </mo> 
        <mi>
          t 
        </mi> 
        <mo>
          ) 
        </mo> 
       </mrow> 
      </mrow> 
     </math> (25)</p>
    <p>where Equation (18) indicates that the location of the user in the cell cannot exceed the range of that cell, and Equation (19) indicates the energy limit of the MEC. Equation (20) indicates that the offloading rate is between 0 and 1 and the number of offloaded MECs cannot exceed the number of MEC servers in the cell. Equation (21) indicates that the offload rate is between 0 and 1 and the number of offloaded cells cannot exceed the total number of cells. Equation (22) indicates a range of memory resources for the MEC server. Equation (23) denotes a range in which the sum of the allocation ratios of the arithmetic resources and the ratios cannot exceed 1. Equation (24) represents a range where the sum of the allocation ratios of the arithmetic resources to the tasks passed from other cells cannot exceed 1 as well as the ratio. Equation (25) indicates that the delay of the task cannot exceed the maximum delay that the user can receive. After many experiments, 
     <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <msub> 
        <mi>
          ρ 
        </mi> 
        <mn>
          1 
        </mn> 
       </msub> 
       <mo>
         = 
       </mo> 
       <mn>
         0.53 
       </mn> 
      </mrow> 
     </math>, 
     <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <msub> 
        <mi>
          ρ 
        </mi> 
        <mn>
          2 
        </mn> 
       </msub> 
       <mo>
         = 
       </mo> 
       <mn>
         0.007 
       </mn> 
      </mrow> 
     </math> can better guide the model to find the optimal policy.</p>
   </sec>
  </sec><sec id="s3">
   <title>
    <xref ref-type="bibr" rid="scirp.134131-"></xref>3. MADDPG-Based Dynamic Computational Offloading Algorithm</title>
   <p>This study proposes a dynamic computational offloading algorithm based on Multi-Agent Deep Deterministic Policy Gradient (MADDPG) to obtain the optimal policy. The algorithm will be described in detail in the following section.</p>
   <sec id="s3_1">
    <title>
     <xref ref-type="bibr" rid="scirp.134131-"></xref>3.1. Markov Decision-Making Process</title>
    <p>The process of determining the optimal offloading strategy is modelled as an MDP problem in this study. The DRL algorithm is then employed to identify the optimal optimization strategy. The state space, action space and reward of the Markov decision process are presented in the subsequent section.</p>
    <p>State space: the amount of tasks 
     <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <mi>
         c 
       </mi> 
       <mrow> 
        <mo>
          ( 
        </mo> 
        <mi>
          t 
        </mi> 
        <mo>
          ) 
        </mo> 
       </mrow> 
      </mrow> 
     </math> and the location 
     <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <msub> 
        <mi>
          L 
        </mi> 
        <mi>
          u 
        </mi> 
       </msub> 
       <mrow> 
        <mo>
          ( 
        </mo> 
        <mi>
          t 
        </mi> 
        <mo>
          ) 
        </mo> 
       </mrow> 
      </mrow> 
     </math> of the user for each cell user in the cell, the remaining power 
     <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <msup> 
        <mi>
          E 
        </mi> 
        <mi>
          r 
        </mi> 
       </msup> 
       <mrow> 
        <mo>
          ( 
        </mo> 
        <mi>
          t 
        </mi> 
        <mo>
          ) 
        </mo> 
       </mrow> 
      </mrow> 
     </math> and the storage resource 
     <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <msup> 
        <mi>
          M 
        </mi> 
        <mi>
          r 
        </mi> 
       </msup> 
       <mrow> 
        <mo>
          ( 
        </mo> 
        <mi>
          t 
        </mi> 
        <mo>
          ) 
        </mo> 
       </mrow> 
      </mrow> 
     </math> of the MEC as the current state. Thus the state space can be represented as Equation (26):</p>
    <p>
     <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <mi>
         s 
       </mi> 
       <mrow> 
        <mo>
          ( 
        </mo> 
        <mi>
          t 
        </mi> 
        <mo>
          ) 
        </mo> 
       </mrow> 
       <mo>
         = 
       </mo> 
       <mrow> 
        <mo>
          { 
        </mo> 
        <mrow> 
         <mi>
           c 
         </mi> 
         <mrow> 
          <mo>
            ( 
          </mo> 
          <mi>
            t 
          </mi> 
          <mo>
            ) 
          </mo> 
         </mrow> 
         <mo>
           , 
         </mo> 
         <msub> 
          <mi>
            L 
          </mi> 
          <mi>
            u 
          </mi> 
         </msub> 
         <mrow> 
          <mo>
            ( 
          </mo> 
          <mi>
            t 
          </mi> 
          <mo>
            ) 
          </mo> 
         </mrow> 
         <mo>
           , 
         </mo> 
         <msup> 
          <mi>
            E 
          </mi> 
          <mi>
            r 
          </mi> 
         </msup> 
         <mrow> 
          <mo>
            ( 
          </mo> 
          <mi>
            t 
          </mi> 
          <mo>
            ) 
          </mo> 
         </mrow> 
         <mo>
           , 
         </mo> 
         <msup> 
          <mi>
            M 
          </mi> 
          <mi>
            r 
          </mi> 
         </msup> 
         <mrow> 
          <mo>
            ( 
          </mo> 
          <mi>
            t 
          </mi> 
          <mo>
            ) 
          </mo> 
         </mrow> 
         <mo>
           , 
         </mo> 
         <msub> 
          <mi>
            M 
          </mi> 
          <mrow> 
           <mi>
             i 
           </mi> 
           <mo>
             , 
           </mo> 
           <mi>
             k 
           </mi> 
          </mrow> 
         </msub> 
         <mrow> 
          <mo>
            ( 
          </mo> 
          <mi>
            t 
          </mi> 
          <mo>
            ) 
          </mo> 
         </mrow> 
        </mrow> 
        <mo>
          } 
        </mo> 
       </mrow> 
      </mrow> 
     </math> (26)</p>
    <p>Action space: this study considers offloading to a specific MEC server 
     <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <msubsup> 
        <mi>
          R 
        </mi> 
        <mrow> 
         <mi>
           i 
         </mi> 
         <mo>
           , 
         </mo> 
         <mi>
           j 
         </mi> 
        </mrow> 
        <mrow> 
         <mi>
           i 
         </mi> 
         <mi>
           s 
         </mi> 
         <mi>
           m 
         </mi> 
        </mrow> 
       </msubsup> 
       <mrow> 
        <mo>
          ( 
        </mo> 
        <mi>
          t 
        </mi> 
        <mo>
          ) 
        </mo> 
       </mrow> 
      </mrow> 
     </math>, offloading rate 
     <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <msubsup> 
        <mi>
          R 
        </mi> 
        <mrow> 
         <mi>
           i 
         </mi> 
         <mo>
           , 
         </mo> 
         <mi>
           j 
         </mi> 
        </mrow> 
        <mrow> 
         <mi>
           r 
         </mi> 
         <mi>
           m 
         </mi> 
        </mrow> 
       </msubsup> 
       <mrow> 
        <mo>
          ( 
        </mo> 
        <mi>
          t 
        </mi> 
        <mo>
          ) 
        </mo> 
       </mrow> 
      </mrow> 
     </math>, whether to further offload to MEC servers 
     <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <msubsup> 
        <mi>
          R 
        </mi> 
        <mrow> 
         <mi>
           i 
         </mi> 
         <mo>
           , 
         </mo> 
         <mi>
           j 
         </mi> 
        </mrow> 
        <mrow> 
         <mi>
           i 
         </mi> 
         <mi>
           s 
         </mi> 
         <mi>
           m 
         </mi> 
        </mrow> 
       </msubsup> 
       <mrow> 
        <mo>
          ( 
        </mo> 
        <mi>
          t 
        </mi> 
        <mo>
          ) 
        </mo> 
       </mrow> 
      </mrow> 
     </math> and offloading rate 
     <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <msubsup> 
        <mi>
          R 
        </mi> 
        <mrow> 
         <mi>
           i 
         </mi> 
         <mo>
           , 
         </mo> 
         <mi>
           j 
         </mi> 
        </mrow> 
        <mrow> 
         <mi>
           r 
         </mi> 
         <mi>
           m 
         </mi> 
        </mrow> 
       </msubsup> 
       <mrow> 
        <mo>
          ( 
        </mo> 
        <mi>
          t 
        </mi> 
        <mo>
          ) 
        </mo> 
       </mrow> 
      </mrow> 
     </math> in other cells as the actions of the intelligences. Therefore the action space can be expressed as Equation (27):</p>
    <p>
     <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <msub> 
        <mi>
          a 
        </mi> 
        <mrow> 
         <mi>
           i 
         </mi> 
         <mo>
           , 
         </mo> 
         <mi>
           j 
         </mi> 
        </mrow> 
       </msub> 
       <mrow> 
        <mo>
          ( 
        </mo> 
        <mi>
          t 
        </mi> 
        <mo>
          ) 
        </mo> 
       </mrow> 
       <mo>
         = 
       </mo> 
       <mrow> 
        <mo>
          { 
        </mo> 
        <mrow> 
         <msubsup> 
          <mi>
            R 
          </mi> 
          <mrow> 
           <mi>
             i 
           </mi> 
           <mo>
             , 
           </mo> 
           <mi>
             j 
           </mi> 
          </mrow> 
          <mrow> 
           <mi>
             i 
           </mi> 
           <mi>
             s 
           </mi> 
           <mi>
             m 
           </mi> 
          </mrow> 
         </msubsup> 
         <mrow> 
          <mo>
            ( 
          </mo> 
          <mi>
            t 
          </mi> 
          <mo>
            ) 
          </mo> 
         </mrow> 
         <mo>
           , 
         </mo> 
         <msubsup> 
          <mi>
            R 
          </mi> 
          <mrow> 
           <mi>
             i 
           </mi> 
           <mo>
             , 
           </mo> 
           <mi>
             j 
           </mi> 
          </mrow> 
          <mrow> 
           <mi>
             r 
           </mi> 
           <mi>
             m 
           </mi> 
          </mrow> 
         </msubsup> 
         <mrow> 
          <mo>
            ( 
          </mo> 
          <mi>
            t 
          </mi> 
          <mo>
            ) 
          </mo> 
         </mrow> 
         <mo>
           , 
         </mo> 
         <msubsup> 
          <mi>
            R 
          </mi> 
          <mrow> 
           <mi>
             i 
           </mi> 
           <mo>
             , 
           </mo> 
           <mi>
             j 
           </mi> 
          </mrow> 
          <mrow> 
           <mi>
             i 
           </mi> 
           <mi>
             s 
           </mi> 
           <mi>
             s 
           </mi> 
          </mrow> 
         </msubsup> 
         <mrow> 
          <mo>
            ( 
          </mo> 
          <mi>
            t 
          </mi> 
          <mo>
            ) 
          </mo> 
         </mrow> 
         <mo>
           , 
         </mo> 
         <msubsup> 
          <mi>
            R 
          </mi> 
          <mrow> 
           <mi>
             i 
           </mi> 
           <mo>
             , 
           </mo> 
           <mi>
             j 
           </mi> 
          </mrow> 
          <mrow> 
           <mi>
             r 
           </mi> 
           <mi>
             s 
           </mi> 
          </mrow> 
         </msubsup> 
         <mrow> 
          <mo>
            ( 
          </mo> 
          <mi>
            t 
          </mi> 
          <mo>
            ) 
          </mo> 
         </mrow> 
        </mrow> 
        <mo>
          } 
        </mo> 
       </mrow> 
      </mrow> 
     </math> (27)</p>
    <p>Reward: The optimization objective of this study is to minimize the weighted sum of the total delay 
     <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <mi>
         T 
       </mi> 
       <mrow> 
        <mo>
          ( 
        </mo> 
        <mi>
          t 
        </mi> 
        <mo>
          ) 
        </mo> 
       </mrow> 
      </mrow> 
     </math> and the total energy consumption 
     <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <mi>
         E 
       </mi> 
       <mrow> 
        <mo>
          ( 
        </mo> 
        <mi>
          t 
        </mi> 
        <mo>
          ) 
        </mo> 
       </mrow> 
      </mrow> 
     </math>. The reward can be expressed as follows. Therefore the reward can be expressed as follows Equation (28).</p>
    <p>
     <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <mi>
         r 
       </mi> 
       <mrow> 
        <mo>
          ( 
        </mo> 
        <mi>
          t 
        </mi> 
        <mo>
          ) 
        </mo> 
       </mrow> 
       <mo>
         = 
       </mo> 
       <mo>
         − 
       </mo> 
       <mrow> 
        <mo>
          ( 
        </mo> 
        <mrow> 
         <msub> 
          <mi>
            ρ 
          </mi> 
          <mn>
            1 
          </mn> 
         </msub> 
         <mi>
           E 
         </mi> 
         <mrow> 
          <mo>
            ( 
          </mo> 
          <mi>
            t 
          </mi> 
          <mo>
            ) 
          </mo> 
         </mrow> 
         <mo>
           + 
         </mo> 
         <msub> 
          <mi>
            ρ 
          </mi> 
          <mn>
            2 
          </mn> 
         </msub> 
         <mi>
           T 
         </mi> 
         <mrow> 
          <mo>
            ( 
          </mo> 
          <mi>
            t 
          </mi> 
          <mo>
            ) 
          </mo> 
         </mrow> 
        </mrow> 
        <mo>
          ) 
        </mo> 
       </mrow> 
      </mrow> 
     </math> (28)</p>
    <p>where, 
     <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <msub> 
        <mi>
          ρ 
        </mi> 
        <mn>
          1 
        </mn> 
       </msub> 
      </mrow> 
     </math> and 
     <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <msub> 
        <mi>
          ρ 
        </mi> 
        <mn>
          2 
        </mn> 
       </msub> 
      </mrow> 
     </math> denote the weights of energy consumption and delay respectively.</p>
   </sec>
   <sec id="s3_2">
    <title>
     <xref ref-type="bibr" rid="scirp.134131-"></xref>3.2. Resource Distribution</title>
    <p>In this study, MEC server resources will be allocated after computational offloading. Effective allocation of resources can optimize the performance of the MEC system. This study considers the allocation of arithmetic resources.</p>
    <p>The allocation of arithmetic resources refers to the allocation of arithmetic resources uploaded to the MEC server under the management of the NFV controller, with the main purpose of more fully meeting the needs of end users. The main purpose of the allocation of arithmetic resources is to reduce the processing delay of the user, and this study assumes that a user will only use one channel within a timestamp. Derivation of 
     <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <msub> 
        <mi>
          θ 
        </mi> 
        <mrow> 
         <mi>
           i 
         </mi> 
         <mo>
           , 
         </mo> 
         <mi>
           j 
         </mi> 
        </mrow> 
       </msub> 
      </mrow> 
     </math> in 
     <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <msub> 
        <mi>
          T 
        </mi> 
        <mrow> 
         <mi>
           i 
         </mi> 
         <mo>
           , 
         </mo> 
         <mi>
           j 
         </mi> 
         <mo>
           , 
         </mo> 
         <mi>
           v 
         </mi> 
        </mrow> 
       </msub> 
      </mrow> 
     </math> shows that:</p>
    <p>
     <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <mfrac> 
        <mrow> 
         <mo>
           ∂ 
         </mo> 
         <msub> 
          <mi>
            T 
          </mi> 
          <mrow> 
           <mi>
             i 
           </mi> 
           <mo>
             , 
           </mo> 
           <mi>
             j 
           </mi> 
           <mo>
             , 
           </mo> 
           <mi>
             v 
           </mi> 
          </mrow> 
         </msub> 
        </mrow> 
        <mrow> 
         <mo>
           ∂ 
         </mo> 
         <msub> 
          <mi>
            θ 
          </mi> 
          <mrow> 
           <mi>
             i 
           </mi> 
           <mo>
             , 
           </mo> 
           <mi>
             j 
           </mi> 
          </mrow> 
         </msub> 
        </mrow> 
       </mfrac> 
       <mo>
         = 
       </mo> 
       <mo>
         − 
       </mo> 
       <mfrac> 
        <mrow> 
         <mrow> 
          <mo>
            ( 
          </mo> 
          <mrow> 
           <mn>
             1 
           </mn> 
           <mo>
             − 
           </mo> 
           <msubsup> 
            <mi>
              R 
            </mi> 
            <mrow> 
             <mi>
               i 
             </mi> 
             <mo>
               , 
             </mo> 
             <mi>
               j 
             </mi> 
            </mrow> 
            <mrow> 
             <mi>
               r 
             </mi> 
             <mi>
               s 
             </mi> 
            </mrow> 
           </msubsup> 
           <mrow> 
            <mo>
              ( 
            </mo> 
            <mi>
              t 
            </mi> 
            <mo>
              ) 
            </mo> 
           </mrow> 
          </mrow> 
          <mo>
            ) 
          </mo> 
         </mrow> 
         <msubsup> 
          <mi>
            R 
          </mi> 
          <mrow> 
           <mi>
             i 
           </mi> 
           <mo>
             , 
           </mo> 
           <mi>
             j 
           </mi> 
          </mrow> 
          <mrow> 
           <mi>
             r 
           </mi> 
           <mi>
             m 
           </mi> 
          </mrow> 
         </msubsup> 
         <mrow> 
          <mo>
            ( 
          </mo> 
          <mi>
            t 
          </mi> 
          <mo>
            ) 
          </mo> 
         </mrow> 
         <msub> 
          <mi>
            c 
          </mi> 
          <mrow> 
           <mi>
             i 
           </mi> 
           <mo>
             , 
           </mo> 
           <mi>
             j 
           </mi> 
          </mrow> 
         </msub> 
         <mrow> 
          <mo>
            ( 
          </mo> 
          <mi>
            t 
          </mi> 
          <mo>
            ) 
          </mo> 
         </mrow> 
        </mrow> 
        <mrow> 
         <msub> 
          <mi>
            θ 
          </mi> 
          <mrow> 
           <mi>
             i 
           </mi> 
           <mo>
             , 
           </mo> 
           <mi>
             j 
           </mi> 
          </mrow> 
         </msub> 
         <msub> 
          <mi>
            f 
          </mi> 
          <mrow> 
           <mi>
             i 
           </mi> 
           <mo>
             , 
           </mo> 
           <mi>
             k 
           </mi> 
          </mrow> 
         </msub> 
        </mrow> 
       </mfrac> 
      </mrow> 
     </math> (29)</p>
    <p>It can be seen in the derivation of the above equation:</p>
    <p>
     <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <mfrac> 
        <mrow> 
         <msup> 
          <mo>
            ∂ 
          </mo> 
          <mn>
            2 
          </mn> 
         </msup> 
         <msub> 
          <mi>
            T 
          </mi> 
          <mrow> 
           <mi>
             i 
           </mi> 
           <mo>
             , 
           </mo> 
           <mi>
             j 
           </mi> 
           <mo>
             , 
           </mo> 
           <mi>
             v 
           </mi> 
          </mrow> 
         </msub> 
        </mrow> 
        <mrow> 
         <mo>
           ∂ 
         </mo> 
         <msubsup> 
          <mi>
            θ 
          </mi> 
          <mrow> 
           <mi>
             i 
           </mi> 
           <mo>
             , 
           </mo> 
           <mi>
             j 
           </mi> 
          </mrow> 
          <mn>
            2 
          </mn> 
         </msubsup> 
        </mrow> 
       </mfrac> 
       <mo>
         = 
       </mo> 
       <mn>
         2 
       </mn> 
       <mfrac> 
        <mrow> 
         <mrow> 
          <mo>
            ( 
          </mo> 
          <mrow> 
           <mn>
             1 
           </mn> 
           <mo>
             − 
           </mo> 
           <msubsup> 
            <mi>
              R 
            </mi> 
            <mrow> 
             <mi>
               i 
             </mi> 
             <mo>
               , 
             </mo> 
             <mi>
               j 
             </mi> 
            </mrow> 
            <mrow> 
             <mi>
               r 
             </mi> 
             <mi>
               s 
             </mi> 
            </mrow> 
           </msubsup> 
           <mrow> 
            <mo>
              ( 
            </mo> 
            <mi>
              t 
            </mi> 
            <mo>
              ) 
            </mo> 
           </mrow> 
          </mrow> 
          <mo>
            ) 
          </mo> 
         </mrow> 
         <msubsup> 
          <mi>
            R 
          </mi> 
          <mrow> 
           <mi>
             i 
           </mi> 
           <mo>
             , 
           </mo> 
           <mi>
             j 
           </mi> 
          </mrow> 
          <mrow> 
           <mi>
             r 
           </mi> 
           <mi>
             m 
           </mi> 
          </mrow> 
         </msubsup> 
         <mrow> 
          <mo>
            ( 
          </mo> 
          <mi>
            t 
          </mi> 
          <mo>
            ) 
          </mo> 
         </mrow> 
         <msub> 
          <mi>
            c 
          </mi> 
          <mrow> 
           <mi>
             i 
           </mi> 
           <mo>
             , 
           </mo> 
           <mi>
             j 
           </mi> 
          </mrow> 
         </msub> 
         <mrow> 
          <mo>
            ( 
          </mo> 
          <mi>
            t 
          </mi> 
          <mo>
            ) 
          </mo> 
         </mrow> 
        </mrow> 
        <mrow> 
         <msubsup> 
          <mi>
            θ 
          </mi> 
          <mrow> 
           <mi>
             i 
           </mi> 
           <mo>
             , 
           </mo> 
           <mi>
             j 
           </mi> 
          </mrow> 
          <mn>
            3 
          </mn> 
         </msubsup> 
         <msub> 
          <mi>
            f 
          </mi> 
          <mrow> 
           <mi>
             i 
           </mi> 
           <mo>
             , 
           </mo> 
           <mi>
             k 
           </mi> 
          </mrow> 
         </msub> 
        </mrow> 
       </mfrac> 
       <mo>
         ≥ 
       </mo> 
       <mn>
         0 
       </mn> 
      </mrow> 
     </math> (30)</p>
    <p>Since 
     <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <msubsup> 
        <mi>
          R 
        </mi> 
        <mrow> 
         <mi>
           i 
         </mi> 
         <mo>
           , 
         </mo> 
         <mi>
           j 
         </mi> 
        </mrow> 
        <mrow> 
         <mi>
           r 
         </mi> 
         <mi>
           s 
         </mi> 
        </mrow> 
       </msubsup> 
       <mrow> 
        <mo>
          ( 
        </mo> 
        <mi>
          t 
        </mi> 
        <mo>
          ) 
        </mo> 
       </mrow> 
      </mrow> 
     </math>, 
     <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <msubsup> 
        <mi>
          R 
        </mi> 
        <mrow> 
         <mi>
           i 
         </mi> 
         <mo>
           , 
         </mo> 
         <mi>
           j 
         </mi> 
        </mrow> 
        <mrow> 
         <mi>
           r 
         </mi> 
         <mi>
           m 
         </mi> 
        </mrow> 
       </msubsup> 
       <mrow> 
        <mo>
          ( 
        </mo> 
        <mi>
          t 
        </mi> 
        <mo>
          ) 
        </mo> 
       </mrow> 
      </mrow> 
     </math>, 
     <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <msub> 
        <mi>
          f 
        </mi> 
        <mrow> 
         <mi>
           i 
         </mi> 
         <mo>
           , 
         </mo> 
         <mi>
           k 
         </mi> 
        </mrow> 
       </msub> 
      </mrow> 
     </math> and 
     <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <msub> 
        <mi>
          θ 
        </mi> 
        <mrow> 
         <mi>
           i 
         </mi> 
         <mo>
           , 
         </mo> 
         <mi>
           j 
         </mi> 
        </mrow> 
       </msub> 
      </mrow> 
     </math> are all greater than 0, it follows that the user can only pair the resources of one channel in a given timestamp. Consequently, the Hesse matrix of channel resources at that moment is positive definite. The optimal arithmetic resource allocation can be solved by Lagrange Multiplier Method as follows.</p>
    <p>
     <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <msubsup> 
        <mi>
          θ 
        </mi> 
        <mrow> 
         <mi>
           i 
         </mi> 
         <mo>
           , 
         </mo> 
         <mi>
           j 
         </mi> 
        </mrow> 
        <mo>
          * 
        </mo> 
       </msubsup> 
       <mo>
         = 
       </mo> 
       <mfrac> 
        <mrow> 
         <msqrt> 
          <mrow> 
           <mrow> 
            <mo>
              ( 
            </mo> 
            <mrow> 
             <mn>
               1 
             </mn> 
             <mo>
               − 
             </mo> 
             <msubsup> 
              <mi>
                R 
              </mi> 
              <mrow> 
               <mi>
                 i 
               </mi> 
               <mo>
                 , 
               </mo> 
               <mi>
                 j 
               </mi> 
              </mrow> 
              <mrow> 
               <mi>
                 r 
               </mi> 
               <mi>
                 s 
               </mi> 
              </mrow> 
             </msubsup> 
             <mrow> 
              <mo>
                ( 
              </mo> 
              <mi>
                t 
              </mi> 
              <mo>
                ) 
              </mo> 
             </mrow> 
            </mrow> 
            <mo>
              ) 
            </mo> 
           </mrow> 
           <msubsup> 
            <mi>
              R 
            </mi> 
            <mrow> 
             <mi>
               i 
             </mi> 
             <mo>
               , 
             </mo> 
             <mi>
               j 
             </mi> 
            </mrow> 
            <mrow> 
             <mi>
               r 
             </mi> 
             <mi>
               m 
             </mi> 
            </mrow> 
           </msubsup> 
           <mrow> 
            <mo>
              ( 
            </mo> 
            <mi>
              t 
            </mi> 
            <mo>
              ) 
            </mo> 
           </mrow> 
           <msub> 
            <mi>
              c 
            </mi> 
            <mrow> 
             <mi>
               i 
             </mi> 
             <mo>
               , 
             </mo> 
             <mi>
               j 
             </mi> 
            </mrow> 
           </msub> 
           <mrow> 
            <mo>
              ( 
            </mo> 
            <mi>
              t 
            </mi> 
            <mo>
              ) 
            </mo> 
           </mrow> 
          </mrow> 
         </msqrt> 
        </mrow> 
        <mrow> 
         <mstyle displaystyle="true"> 
          <munderover> 
           <mo>
             ∑ 
           </mo> 
           <mrow> 
            <mi>
              i 
            </mi> 
            <mo>
              = 
            </mo> 
            <mn>
              1 
            </mn> 
           </mrow> 
           <mi>
             m 
           </mi> 
          </munderover> 
          <mrow> 
           <msqrt> 
            <mrow> 
             <mrow> 
              <mo>
                ( 
              </mo> 
              <mrow> 
               <mn>
                 1 
               </mn> 
               <mo>
                 − 
               </mo> 
               <msubsup> 
                <mi>
                  R 
                </mi> 
                <mrow> 
                 <mi>
                   i 
                 </mi> 
                 <mo>
                   , 
                 </mo> 
                 <mi>
                   j 
                 </mi> 
                </mrow> 
                <mrow> 
                 <mi>
                   r 
                 </mi> 
                 <mi>
                   s 
                 </mi> 
                </mrow> 
               </msubsup> 
               <mrow> 
                <mo>
                  ( 
                </mo> 
                <mi>
                  t 
                </mi> 
                <mo>
                  ) 
                </mo> 
               </mrow> 
              </mrow> 
              <mo>
                ) 
              </mo> 
             </mrow> 
             <msubsup> 
              <mi>
                R 
              </mi> 
              <mrow> 
               <mi>
                 i 
               </mi> 
               <mo>
                 , 
               </mo> 
               <mi>
                 j 
               </mi> 
              </mrow> 
              <mrow> 
               <mi>
                 r 
               </mi> 
               <mi>
                 m 
               </mi> 
              </mrow> 
             </msubsup> 
             <mrow> 
              <mo>
                ( 
              </mo> 
              <mi>
                t 
              </mi> 
              <mo>
                ) 
              </mo> 
             </mrow> 
             <msub> 
              <mi>
                c 
              </mi> 
              <mrow> 
               <mi>
                 i 
               </mi> 
               <mo>
                 , 
               </mo> 
               <mi>
                 j 
               </mi> 
              </mrow> 
             </msub> 
             <mrow> 
              <mo>
                ( 
              </mo> 
              <mi>
                t 
              </mi> 
              <mo>
                ) 
              </mo> 
             </mrow> 
            </mrow> 
           </msqrt> 
           <mo>
             + 
           </mo> 
           <msqrt> 
            <mrow> 
             <msub> 
              <mi>
                s 
              </mi> 
              <mrow> 
               <mi>
                 o 
               </mi> 
               <mi>
                 v 
               </mi> 
              </mrow> 
             </msub> 
            </mrow> 
           </msqrt> 
          </mrow> 
         </mstyle> 
        </mrow> 
       </mfrac> 
      </mrow> 
     </math> (31)</p>
    <p>The optimal arithmetic allocation for tasks transmitted from other cells is thus determined:</p>
    <p>
     <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <msubsup> 
        <mi>
          θ 
        </mi> 
        <mrow> 
         <mi>
           o 
         </mi> 
         <mi>
           v 
         </mi> 
        </mrow> 
        <mo>
          * 
        </mo> 
       </msubsup> 
       <mo>
         = 
       </mo> 
       <mfrac> 
        <mrow> 
         <msqrt> 
          <mrow> 
           <msub> 
            <mi>
              s 
            </mi> 
            <mrow> 
             <mi>
               o 
             </mi> 
             <mi>
               v 
             </mi> 
            </mrow> 
           </msub> 
          </mrow> 
         </msqrt> 
        </mrow> 
        <mrow> 
         <mstyle displaystyle="true"> 
          <munderover> 
           <mo>
             ∑ 
           </mo> 
           <mrow> 
            <mi>
              i 
            </mi> 
            <mo>
              = 
            </mo> 
            <mn>
              1 
            </mn> 
           </mrow> 
           <mi>
             m 
           </mi> 
          </munderover> 
          <mrow> 
           <msqrt> 
            <mrow> 
             <mrow> 
              <mo>
                ( 
              </mo> 
              <mrow> 
               <mn>
                 1 
               </mn> 
               <mo>
                 − 
               </mo> 
               <msubsup> 
                <mi>
                  R 
                </mi> 
                <mrow> 
                 <mi>
                   i 
                 </mi> 
                 <mo>
                   , 
                 </mo> 
                 <mi>
                   j 
                 </mi> 
                </mrow> 
                <mrow> 
                 <mi>
                   r 
                 </mi> 
                 <mi>
                   s 
                 </mi> 
                </mrow> 
               </msubsup> 
               <mrow> 
                <mo>
                  ( 
                </mo> 
                <mi>
                  t 
                </mi> 
                <mo>
                  ) 
                </mo> 
               </mrow> 
              </mrow> 
              <mo>
                ) 
              </mo> 
             </mrow> 
             <msubsup> 
              <mi>
                R 
              </mi> 
              <mrow> 
               <mi>
                 i 
               </mi> 
               <mo>
                 , 
               </mo> 
               <mi>
                 j 
               </mi> 
              </mrow> 
              <mrow> 
               <mi>
                 r 
               </mi> 
               <mi>
                 m 
               </mi> 
              </mrow> 
             </msubsup> 
             <mrow> 
              <mo>
                ( 
              </mo> 
              <mi>
                t 
              </mi> 
              <mo>
                ) 
              </mo> 
             </mrow> 
             <msub> 
              <mi>
                c 
              </mi> 
              <mrow> 
               <mi>
                 i 
               </mi> 
               <mo>
                 , 
               </mo> 
               <mi>
                 j 
               </mi> 
              </mrow> 
             </msub> 
             <mrow> 
              <mo>
                ( 
              </mo> 
              <mi>
                t 
              </mi> 
              <mo>
                ) 
              </mo> 
             </mrow> 
            </mrow> 
           </msqrt> 
           <mo>
             + 
           </mo> 
           <msqrt> 
            <mrow> 
             <msub> 
              <mi>
                s 
              </mi> 
              <mrow> 
               <mi>
                 o 
               </mi> 
               <mi>
                 v 
               </mi> 
              </mrow> 
             </msub> 
            </mrow> 
           </msqrt> 
          </mrow> 
         </mstyle> 
        </mrow> 
       </mfrac> 
      </mrow> 
     </math> (32)</p>
    <p>In this context, the symbol 
     <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <msub> 
        <mi>
          s 
        </mi> 
        <mrow> 
         <mi>
           o 
         </mi> 
         <mi>
           v 
         </mi> 
        </mrow> 
       </msub> 
      </mrow> 
     </math> represents the size of the task assigned to the kth MEC from other cells.</p>
   </sec>
   <sec id="s3_3">
    <title>3.3. MADDPG-Based Dynamic Computational Offload Algorithm</title>
    <p>One of the main reasons why traditional reinforcement learning methods are difficult to apply to multi-intelligent body environments is that the strategy of each intelligent body is constantly changing during the training process, leading to an unstable environment for each individual intelligent body. MADDPG <xref ref-type="bibr" rid="scirp.134131-21">
      [21]
     </xref> is a reinforcement learning algorithm designed for multi-intelligent body systems. It extends DDPG for environments where multiple intelligences are present simultaneously. The learners of each intelligence share the experience playback buffer and use the strategies of other intelligences to assist in decision making, resulting in an overall collaborative behaviour. MADDPG uses a strategy of centralised training and decentralised execution in the training process.</p>
    <p>In MADDPG, the actions of the intelligences affect the state transfer of the environment so that the state transfer function can be described as</p>
    <p>
     <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <msub> 
        <mi>
          s 
        </mi> 
        <mrow> 
         <mi>
           t 
         </mi> 
         <mo>
           + 
         </mo> 
         <mn>
           1 
         </mn> 
        </mrow> 
       </msub> 
       <mo>
         = 
       </mo> 
       <mi>
         f 
       </mi> 
       <mrow> 
        <mo>
          ( 
        </mo> 
        <mrow> 
         <msub> 
          <mi>
            s 
          </mi> 
          <mi>
            t 
          </mi> 
         </msub> 
         <mo>
           , 
         </mo> 
         <msub> 
          <mi>
            a 
          </mi> 
          <mn>
            1 
          </mn> 
         </msub> 
         <mo>
           , 
         </mo> 
         <msub> 
          <mi>
            a 
          </mi> 
          <mn>
            2 
          </mn> 
         </msub> 
         <mo>
           , 
         </mo> 
         <mo>
           ⋯ 
         </mo> 
         <mo>
           , 
         </mo> 
         <msub> 
          <mi>
            a 
          </mi> 
          <mi>
            N 
          </mi> 
         </msub> 
        </mrow> 
        <mo>
          ) 
        </mo> 
       </mrow> 
      </mrow> 
     </math> (33)</p>
    <p>The reward function of MADDPG can be formulated as follows:</p>
    <p>
     <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <msubsup> 
        <mi>
          r 
        </mi> 
        <mi>
          t 
        </mi> 
        <mi>
          i 
        </mi> 
       </msubsup> 
       <mo>
         = 
       </mo> 
       <msub> 
        <mi>
          R 
        </mi> 
        <mi>
          i 
        </mi> 
       </msub> 
       <mrow> 
        <mo>
          ( 
        </mo> 
        <mrow> 
         <msub> 
          <mi>
            s 
          </mi> 
          <mi>
            t 
          </mi> 
         </msub> 
         <mo>
           , 
         </mo> 
         <msub> 
          <mi>
            a 
          </mi> 
          <mn>
            1 
          </mn> 
         </msub> 
         <mo>
           , 
         </mo> 
         <msub> 
          <mi>
            a 
          </mi> 
          <mn>
            2 
          </mn> 
         </msub> 
         <mo>
           , 
         </mo> 
         <mo>
           ⋯ 
         </mo> 
         <mo>
           , 
         </mo> 
         <msub> 
          <mi>
            a 
          </mi> 
          <mi>
            N 
          </mi> 
         </msub> 
        </mrow> 
        <mo>
          ) 
        </mo> 
       </mrow> 
      </mrow> 
     </math> (34)</p>
    <p>where A denotes the reward given to, the ith intelligent in the tth timestamp, and B denotes the reward function of the intelligent.</p>
    <p>The value function of MADDPG can be expressed as:</p>
    <p>
     <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <msub> 
        <mi>
          Q 
        </mi> 
        <mi>
          i 
        </mi> 
       </msub> 
       <mrow> 
        <mo>
          ( 
        </mo> 
        <mrow> 
         <msub> 
          <mi>
            s 
          </mi> 
          <mi>
            t 
          </mi> 
         </msub> 
         <mo>
           , 
         </mo> 
         <msub> 
          <mi>
            a 
          </mi> 
          <mn>
            1 
          </mn> 
         </msub> 
         <mo>
           , 
         </mo> 
         <msub> 
          <mi>
            a 
          </mi> 
          <mn>
            2 
          </mn> 
         </msub> 
         <mo>
           , 
         </mo> 
         <mo>
           ⋯ 
         </mo> 
         <mo>
           , 
         </mo> 
         <msub> 
          <mi>
            a 
          </mi> 
          <mi>
            N 
          </mi> 
         </msub> 
        </mrow> 
        <mo>
          ) 
        </mo> 
       </mrow> 
      </mrow> 
     </math> (35)</p>
   </sec>
   <sec id="s3_4">
    <title>
     <xref ref-type="bibr" rid="scirp.134131-"></xref>3.4. MADDPG-Based Dynamic Computational Offloading Algorithm</title>
    <p>Algorithm 1 is a dynamic computational offloading algorithm based on MADDPG.</p>
    <p>Algorithm 1. MADDPG-based dynamic computational offloading algorithm.</p>
    <table class="MsoTableGrid custom-table" border="0" cellspacing="0" cellpadding="0"> 
     <tr> 
      <td class="custom-bottom-td custom-top-td aboth" width="100.00%"><p style="text-align:justify">MADDPG-based joint offloading algorithm (MADDPGDCO algorithm)</p></td> 
     </tr> 
     <tr> 
      <td class="custom-top-td aboth" width="100.00%"><p style="text-align:justify">1: Input: initial position of MEC 
        <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
          <msub> 
           <mi>
             L 
           </mi> 
           <mrow> 
            <mi>
              M 
            </mi> 
            <mi>
              E 
            </mi> 
            <msub> 
             <mi>
               C 
             </mi> 
             <mrow> 
              <mi>
                i 
              </mi> 
              <mo>
                , 
              </mo> 
              <mi>
                k 
              </mi> 
             </mrow> 
            </msub> 
           </mrow> 
          </msub> 
         </mrow> 
        </math>,initial power 
        <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
          <msubsup> 
           <mi>
             E 
           </mi> 
           <mrow> 
            <mi>
              i 
            </mi> 
            <mo>
              , 
            </mo> 
            <mi>
              j 
            </mi> 
           </mrow> 
           <mi>
             v 
           </mi> 
          </msubsup> 
          <mrow> 
           <mo>
             ( 
           </mo> 
           <mi>
             t 
           </mi> 
           <mo>
             ) 
           </mo> 
          </mrow> 
         </mrow> 
        </math>,initial amount of data for computational task 
        <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
          <msub> 
           <mi>
             c 
           </mi> 
           <mrow> 
            <mi>
              i 
            </mi> 
            <mo>
              , 
            </mo> 
            <mi>
              j 
            </mi> 
           </mrow> 
          </msub> 
          <mrow> 
           <mo>
             ( 
           </mo> 
           <mi>
             t 
           </mi> 
           <mo>
             ) 
           </mo> 
          </mrow> 
         </mrow> 
        </math></p><p style="text-align:justify">2: Initialisation: actor network parameters 
        <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
          <msubsup> 
           <mi>
             θ 
           </mi> 
           <mrow> 
            <mi>
              t 
            </mi> 
            <mi>
              a 
            </mi> 
            <mi>
              r 
            </mi> 
            <mi>
              g 
            </mi> 
            <mi>
              e 
            </mi> 
            <mi>
              t 
            </mi> 
           </mrow> 
           <mi>
             π 
           </mi> 
          </msubsup> 
         </mrow> 
        </math> and critical network parameters 
        <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
          <msup> 
           <mi>
             θ 
           </mi> 
           <mi>
             Q 
           </mi> 
          </msup> 
         </mrow> 
        </math> for all intelligences</p><p style="text-align:justify">3: Initialisation: target network parameters 
        <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
          <msubsup> 
           <mi>
             θ 
           </mi> 
           <mrow> 
            <mi>
              t 
            </mi> 
            <mi>
              a 
            </mi> 
            <mi>
              r 
            </mi> 
            <mi>
              g 
            </mi> 
            <mi>
              e 
            </mi> 
            <mi>
              t 
            </mi> 
           </mrow> 
           <mi>
             π 
           </mi> 
          </msubsup> 
         </mrow> 
        </math> and 
        <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
          <msubsup> 
           <mi>
             θ 
           </mi> 
           <mrow> 
            <mi>
              t 
            </mi> 
            <mi>
              a 
            </mi> 
            <mi>
              r 
            </mi> 
            <mi>
              g 
            </mi> 
            <mi>
              e 
            </mi> 
            <mi>
              t 
            </mi> 
           </mrow> 
           <mi>
             Q 
           </mi> 
          </msubsup> 
         </mrow> 
        </math></p><p style="text-align:justify">4: Set learning rate 
        <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
          <msup> 
           <mi>
             α 
           </mi> 
           <mi>
             π 
           </mi> 
          </msup> 
         </mrow> 
        </math> and 
        <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
          <msup> 
           <mi>
             α 
           </mi> 
           <mi>
             Q 
           </mi> 
          </msup> 
         </mrow> 
        </math></p><p style="text-align:justify">5: Set experience playback buffer D</p><p style="text-align:justify">6: Set batch size batch_size</p><p style="text-align:justify">7: Set 
        <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mi>
           γ 
         </mi> 
        </math> as discount factor</p><p style="text-align:justify">8: Set the exploration noise parameter</p><p style="text-align:justify">9: For each episode:</p><p style="text-align:justify">10: For each time step t:</p><p style="text-align:justify">11: For each intelligence i:</p><p style="text-align:justify">12: Use actor network to select action 
        <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
          <msub> 
           <mi>
             a 
           </mi> 
           <mrow> 
            <mi>
              i 
            </mi> 
            <mo>
              , 
            </mo> 
            <mi>
              j 
            </mi> 
           </mrow> 
          </msub> 
          <mrow> 
           <mo>
             ( 
           </mo> 
           <mi>
             t 
           </mi> 
           <mo>
             ) 
           </mo> 
          </mrow> 
          <mo>
            = 
          </mo> 
          <mrow> 
           <mo>
             { 
           </mo> 
           <mrow> 
            <msubsup> 
             <mi>
               R 
             </mi> 
             <mrow> 
              <mi>
                i 
              </mi> 
              <mo>
                , 
              </mo> 
              <mi>
                j 
              </mi> 
             </mrow> 
             <mrow> 
              <mi>
                i 
              </mi> 
              <mi>
                s 
              </mi> 
              <mi>
                m 
              </mi> 
             </mrow> 
            </msubsup> 
            <mrow> 
             <mo>
               ( 
             </mo> 
             <mi>
               t 
             </mi> 
             <mo>
               ) 
             </mo> 
            </mrow> 
            <mo>
              , 
            </mo> 
            <msubsup> 
             <mi>
               R 
             </mi> 
             <mrow> 
              <mi>
                i 
              </mi> 
              <mo>
                , 
              </mo> 
              <mi>
                j 
              </mi> 
             </mrow> 
             <mrow> 
              <mi>
                r 
              </mi> 
              <mi>
                m 
              </mi> 
             </mrow> 
            </msubsup> 
            <mrow> 
             <mo>
               ( 
             </mo> 
             <mi>
               t 
             </mi> 
             <mo>
               ) 
             </mo> 
            </mrow> 
            <mo>
              , 
            </mo> 
            <msubsup> 
             <mi>
               R 
             </mi> 
             <mrow> 
              <mi>
                i 
              </mi> 
              <mo>
                , 
              </mo> 
              <mi>
                j 
              </mi> 
             </mrow> 
             <mrow> 
              <mi>
                i 
              </mi> 
              <mi>
                s 
              </mi> 
              <mi>
                s 
              </mi> 
             </mrow> 
            </msubsup> 
            <mrow> 
             <mo>
               ( 
             </mo> 
             <mi>
               t 
             </mi> 
             <mo>
               ) 
             </mo> 
            </mrow> 
            <mo>
              , 
            </mo> 
            <msubsup> 
             <mi>
               R 
             </mi> 
             <mrow> 
              <mi>
                i 
              </mi> 
              <mo>
                , 
              </mo> 
              <mi>
                j 
              </mi> 
             </mrow> 
             <mrow> 
              <mi>
                r 
              </mi> 
              <mi>
                s 
              </mi> 
             </mrow> 
            </msubsup> 
            <mrow> 
             <mo>
               ( 
             </mo> 
             <mi>
               t 
             </mi> 
             <mo>
               ) 
             </mo> 
            </mrow> 
           </mrow> 
           <mo>
             } 
           </mo> 
          </mrow> 
         </mrow> 
        </math> based on current observation 
        <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
          <mi>
            s 
          </mi> 
          <mrow> 
           <mo>
             ( 
           </mo> 
           <mi>
             t 
           </mi> 
           <mo>
             ) 
           </mo> 
          </mrow> 
          <mo>
            = 
          </mo> 
          <mrow> 
           <mo>
             { 
           </mo> 
           <mrow> 
            <mi>
              c 
            </mi> 
            <mrow> 
             <mo>
               ( 
             </mo> 
             <mi>
               t 
             </mi> 
             <mo>
               ) 
             </mo> 
            </mrow> 
            <mo>
              , 
            </mo> 
            <msub> 
             <mi>
               L 
             </mi> 
             <mi>
               u 
             </mi> 
            </msub> 
            <mrow> 
             <mo>
               ( 
             </mo> 
             <mi>
               t 
             </mi> 
             <mo>
               ) 
             </mo> 
            </mrow> 
            <mo>
              , 
            </mo> 
            <msup> 
             <mi>
               E 
             </mi> 
             <mi>
               r 
             </mi> 
            </msup> 
            <mrow> 
             <mo>
               ( 
             </mo> 
             <mi>
               t 
             </mi> 
             <mo>
               ) 
             </mo> 
            </mrow> 
            <mo>
              , 
            </mo> 
            <msup> 
             <mi>
               M 
             </mi> 
             <mi>
               r 
             </mi> 
            </msup> 
            <mrow> 
             <mo>
               ( 
             </mo> 
             <mi>
               t 
             </mi> 
             <mo>
               ) 
             </mo> 
            </mrow> 
            <mo>
              , 
            </mo> 
            <msub> 
             <mi>
               M 
             </mi> 
             <mrow> 
              <mi>
                i 
              </mi> 
              <mo>
                , 
              </mo> 
              <mi>
                k 
              </mi> 
             </mrow> 
            </msub> 
            <mrow> 
             <mo>
               ( 
             </mo> 
             <mi>
               t 
             </mi> 
             <mo>
               ) 
             </mo> 
            </mrow> 
           </mrow> 
           <mo>
             } 
           </mo> 
          </mrow> 
         </mrow> 
        </math>, according to policy 
        <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
          <msub> 
           <mi>
             π 
           </mi> 
           <mi>
             θ 
           </mi> 
          </msub> 
         </mrow> 
        </math></p><p style="text-align:justify">13: If 
        <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
          <msubsup> 
           <mi>
             R 
           </mi> 
           <mrow> 
            <mi>
              i 
            </mi> 
            <mo>
              , 
            </mo> 
            <mi>
              j 
            </mi> 
           </mrow> 
           <mrow> 
            <mi>
              i 
            </mi> 
            <mi>
              s 
            </mi> 
            <mi>
              m 
            </mi> 
           </mrow> 
          </msubsup> 
          <mrow> 
           <mo>
             ( 
           </mo> 
           <mi>
             t 
           </mi> 
           <mo>
             ) 
           </mo> 
          </mrow> 
          <mo>
            = 
          </mo> 
          <mo>
            = 
          </mo> 
          <mn>
            0 
          </mn> 
         </mrow> 
        </math> then</p></td> 
     </tr> 
     <tr> 
      <td class="aboth" width="100.00%"><p style="text-align:justify">14: Calculate the delay of the task according to Eq. 
        <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
          <msubsup> 
           <mi>
             T 
           </mi> 
           <mrow> 
            <mi>
              i 
            </mi> 
            <mo>
              , 
            </mo> 
            <mi>
              j 
            </mi> 
           </mrow> 
           <mi>
             L 
           </mi> 
          </msubsup> 
          <mrow> 
           <mo>
             ( 
           </mo> 
           <mi>
             t 
           </mi> 
           <mo>
             ) 
           </mo> 
          </mrow> 
          <mo>
            = 
          </mo> 
          <mfrac> 
           <mrow> 
            <mrow> 
             <mo>
               ( 
             </mo> 
             <mrow> 
              <mn>
                1 
              </mn> 
              <mo>
                − 
              </mo> 
              <msub> 
               <mi>
                 R 
               </mi> 
               <mrow> 
                <mi>
                  r 
                </mi> 
                <mi>
                  m 
                </mi> 
               </mrow> 
              </msub> 
              <mrow> 
               <mo>
                 ( 
               </mo> 
               <mi>
                 t 
               </mi> 
               <mo>
                 ) 
               </mo> 
              </mrow> 
             </mrow> 
             <mo>
               ) 
             </mo> 
            </mrow> 
            <msub> 
             <mi>
               c 
             </mi> 
             <mrow> 
              <mi>
                i 
              </mi> 
              <mo>
                , 
              </mo> 
              <mi>
                j 
              </mi> 
             </mrow> 
            </msub> 
            <mrow> 
             <mo>
               ( 
             </mo> 
             <mi>
               t 
             </mi> 
             <mo>
               ) 
             </mo> 
            </mrow> 
            <mi>
              z 
            </mi> 
           </mrow> 
           <mrow> 
            <msubsup> 
             <mi>
               f 
             </mi> 
             <mrow> 
              <mi>
                i 
              </mi> 
              <mo>
                , 
              </mo> 
              <mi>
                j 
              </mi> 
             </mrow> 
             <mi>
               L 
             </mi> 
            </msubsup> 
           </mrow> 
          </mfrac> 
         </mrow> 
        </math> and 
        <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
          <msubsup> 
           <mi>
             E 
           </mi> 
           <mrow> 
            <mi>
              i 
            </mi> 
            <mo>
              , 
            </mo> 
            <mi>
              j 
            </mi> 
           </mrow> 
           <mi>
             L 
           </mi> 
          </msubsup> 
          <mrow> 
           <mo>
             ( 
           </mo> 
           <mi>
             t 
           </mi> 
           <mo>
             ) 
           </mo> 
          </mrow> 
          <mo>
            = 
          </mo> 
          <msubsup> 
           <mi>
             P 
           </mi> 
           <mrow> 
            <mi>
              i 
            </mi> 
            <mo>
              , 
            </mo> 
            <mi>
              j 
            </mi> 
           </mrow> 
           <mi>
             L 
           </mi> 
          </msubsup> 
          <msubsup> 
           <mi>
             T 
           </mi> 
           <mrow> 
            <mi>
              i 
            </mi> 
            <mo>
              , 
            </mo> 
            <mi>
              j 
            </mi> 
           </mrow> 
           <mi>
             L 
           </mi> 
          </msubsup> 
          <mrow> 
           <mo>
             ( 
           </mo> 
           <mi>
             t 
           </mi> 
           <mo>
             ) 
           </mo> 
          </mrow> 
         </mrow> 
        </math> and the offloading rate A is 0. Calculate the reward value according to Equation (28).</p><p style="text-align:justify">15: else if 
        <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
          <msubsup> 
           <mi>
             R 
           </mi> 
           <mrow> 
            <mi>
              i 
            </mi> 
            <mo>
              , 
            </mo> 
            <mi>
              j 
            </mi> 
           </mrow> 
           <mrow> 
            <mi>
              i 
            </mi> 
            <mi>
              s 
            </mi> 
            <mi>
              m 
            </mi> 
           </mrow> 
          </msubsup> 
          <mrow> 
           <mo>
             ( 
           </mo> 
           <mi>
             t 
           </mi> 
           <mo>
             ) 
           </mo> 
          </mrow> 
          <mo>
            ! 
          </mo> 
          <mo>
            = 
          </mo> 
          <mn>
            0 
          </mn> 
         </mrow> 
        </math></p><p style="text-align:justify">16: if 
        <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
          <msubsup> 
           <mi>
             R 
           </mi> 
           <mrow> 
            <mi>
              i 
            </mi> 
            <mo>
              , 
            </mo> 
            <mi>
              j 
            </mi> 
           </mrow> 
           <mrow> 
            <mi>
              i 
            </mi> 
            <mi>
              s 
            </mi> 
            <mi>
              s 
            </mi> 
           </mrow> 
          </msubsup> 
          <mrow> 
           <mo>
             ( 
           </mo> 
           <mi>
             t 
           </mi> 
           <mo>
             ) 
           </mo> 
          </mrow> 
          <mo>
            = 
          </mo> 
          <mo>
            = 
          </mo> 
          <mn>
            0 
          </mn> 
         </mrow> 
        </math> then</p><p style="text-align:justify">17: Calculate the delay and energy consumption of the task according to 
        <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
          <msub> 
           <mi>
             T 
           </mi> 
           <mrow> 
            <mi>
              i 
            </mi> 
            <mo>
              , 
            </mo> 
            <mi>
              j 
            </mi> 
           </mrow> 
          </msub> 
          <mrow> 
           <mo>
             ( 
           </mo> 
           <mi>
             t 
           </mi> 
           <mo>
             ) 
           </mo> 
          </mrow> 
          <mo>
            = 
          </mo> 
          <mi>
            max 
          </mi> 
          <mrow> 
           <mo>
             ( 
           </mo> 
           <mrow> 
            <msubsup> 
             <mi>
               T 
             </mi> 
             <mrow> 
              <mi>
                i 
              </mi> 
              <mo>
                , 
              </mo> 
              <mi>
                j 
              </mi> 
             </mrow> 
             <mi>
               L 
             </mi> 
            </msubsup> 
            <mrow> 
             <mo>
               ( 
             </mo> 
             <mi>
               t 
             </mi> 
             <mo>
               ) 
             </mo> 
            </mrow> 
            <mo>
              , 
            </mo> 
            <msubsup> 
             <mi>
               T 
             </mi> 
             <mrow> 
              <mi>
                i 
              </mi> 
              <mo>
                , 
              </mo> 
              <mi>
                j 
              </mi> 
             </mrow> 
             <mrow> 
              <mi>
                t 
              </mi> 
              <mi>
                r 
              </mi> 
              <mi>
                a 
              </mi> 
             </mrow> 
            </msubsup> 
            <mrow> 
             <mo>
               ( 
             </mo> 
             <mi>
               t 
             </mi> 
             <mo>
               ) 
             </mo> 
            </mrow> 
            <mo>
              + 
            </mo> 
            <msub> 
             <mi>
               T 
             </mi> 
             <mrow> 
              <mi>
                i 
              </mi> 
              <mo>
                , 
              </mo> 
              <mi>
                j 
              </mi> 
              <mo>
                , 
              </mo> 
              <mi>
                v 
              </mi> 
             </mrow> 
            </msub> 
            <mrow> 
             <mo>
               ( 
             </mo> 
             <mi>
               t 
             </mi> 
             <mo>
               ) 
             </mo> 
            </mrow> 
            <mo>
              , 
            </mo> 
            <msub> 
             <mi>
               T 
             </mi> 
             <mrow> 
              <mi>
                i 
              </mi> 
              <mo>
                , 
              </mo> 
              <mi>
                j 
              </mi> 
              <mo>
                , 
              </mo> 
              <mi>
                o 
              </mi> 
              <mi>
                v 
              </mi> 
             </mrow> 
            </msub> 
            <mrow> 
             <mo>
               ( 
             </mo> 
             <mi>
               t 
             </mi> 
             <mo>
               ) 
             </mo> 
            </mrow> 
           </mrow> 
           <mo>
             ) 
           </mo> 
          </mrow> 
         </mrow> 
        </math> and 
        <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
          <msubsup> 
           <mi>
             E 
           </mi> 
           <mrow> 
            <mi>
              i 
            </mi> 
            <mo>
              , 
            </mo> 
            <mi>
              j 
            </mi> 
           </mrow> 
           <mi>
             v 
           </mi> 
          </msubsup> 
          <mrow> 
           <mo>
             ( 
           </mo> 
           <mi>
             t 
           </mi> 
           <mo>
             ) 
           </mo> 
          </mrow> 
          <mo>
            = 
          </mo> 
          <msubsup> 
           <mi>
             E 
           </mi> 
           <mrow> 
            <mi>
              i 
            </mi> 
            <mo>
              , 
            </mo> 
            <mi>
              k 
            </mi> 
           </mrow> 
           <mi>
             r 
           </mi> 
          </msubsup> 
          <mrow> 
           <mo>
             ( 
           </mo> 
           <mrow> 
            <mi>
              t 
            </mi> 
            <mo>
              − 
            </mo> 
            <mn>
              1 
            </mn> 
           </mrow> 
           <mo>
             ) 
           </mo> 
          </mrow> 
          <mo>
            − 
          </mo> 
          <msubsup> 
           <mi>
             E 
           </mi> 
           <mrow> 
            <mi>
              i 
            </mi> 
            <mo>
              , 
            </mo> 
            <mi>
              j 
            </mi> 
           </mrow> 
           <mrow> 
            <mi>
              t 
            </mi> 
            <mi>
              r 
            </mi> 
            <mi>
              a 
            </mi> 
            <mo>
              , 
            </mo> 
            <mi>
              d 
            </mi> 
            <mi>
              o 
            </mi> 
            <mi>
              w 
            </mi> 
            <mi>
              n 
            </mi> 
           </mrow> 
          </msubsup> 
          <mrow> 
           <mo>
             ( 
           </mo> 
           <mrow> 
            <mi>
              t 
            </mi> 
            <mo>
              − 
            </mo> 
            <mn>
              1 
            </mn> 
           </mrow> 
           <mo>
             ) 
           </mo> 
          </mrow> 
          <mo>
            − 
          </mo> 
          <msub> 
           <mi>
             E 
           </mi> 
           <mrow> 
            <mi>
              i 
            </mi> 
            <mo>
              , 
            </mo> 
            <mi>
              j 
            </mi> 
            <mo>
              , 
            </mo> 
            <mi>
              v 
            </mi> 
           </mrow> 
          </msub> 
          <mrow> 
           <mo>
             ( 
           </mo> 
           <mi>
             t 
           </mi> 
           <mo>
             ) 
           </mo> 
          </mrow> 
          <mo>
            + 
          </mo> 
          <msubsup> 
           <mi>
             E 
           </mi> 
           <mrow> 
            <mi>
              i 
            </mi> 
            <mo>
              , 
            </mo> 
            <mi>
              k 
            </mi> 
           </mrow> 
           <mrow> 
            <mi>
              c 
            </mi> 
            <mi>
              h 
            </mi> 
            <mi>
              a 
            </mi> 
            <mi>
              r 
            </mi> 
            <mi>
              g 
            </mi> 
            <mi>
              e 
            </mi> 
           </mrow> 
          </msubsup> 
         </mrow> 
        </math>.</p><p style="text-align:justify">18: else</p><p style="text-align:justify">19: Assign to run in the corresponding MEC server and calculate the energy consumption and delay of the task according to equation 
        <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
          <mi>
            E 
          </mi> 
          <mrow> 
           <mo>
             ( 
           </mo> 
           <mi>
             t 
           </mi> 
           <mo>
             ) 
           </mo> 
          </mrow> 
          <mo>
            = 
          </mo> 
          <mstyle displaystyle="true"> 
           <munderover> 
            <mo>
              ∑ 
            </mo> 
            <mrow> 
             <mi>
               i 
             </mi> 
             <mo>
               = 
             </mo> 
             <mn>
               1 
             </mn> 
            </mrow> 
            <mi>
              s 
            </mi> 
           </munderover> 
           <mrow> 
            <mstyle displaystyle="true"> 
             <munderover> 
              <mo>
                ∑ 
              </mo> 
              <mrow> 
               <mi>
                 j 
               </mi> 
               <mo>
                 = 
               </mo> 
               <mn>
                 1 
               </mn> 
              </mrow> 
              <mi>
                b 
              </mi> 
             </munderover> 
             <mrow> 
              <msubsup> 
               <mi>
                 E 
               </mi> 
               <mrow> 
                <mi>
                  i 
                </mi> 
                <mo>
                  , 
                </mo> 
                <mi>
                  j 
                </mi> 
               </mrow> 
               <mrow> 
                <mi>
                  t 
                </mi> 
                <mi>
                  r 
                </mi> 
                <mi>
                  a 
                </mi> 
                <mo>
                  , 
                </mo> 
                <mi>
                  d 
                </mi> 
                <mi>
                  o 
                </mi> 
                <mi>
                  w 
                </mi> 
                <mi>
                  n 
                </mi> 
               </mrow> 
              </msubsup> 
              <mrow> 
               <mo>
                 ( 
               </mo> 
               <mi>
                 t 
               </mi> 
               <mo>
                 ) 
               </mo> 
              </mrow> 
              <mo>
                + 
              </mo> 
              <msubsup> 
               <mi>
                 E 
               </mi> 
               <mrow> 
                <mi>
                  i 
                </mi> 
                <mo>
                  , 
                </mo> 
                <mi>
                  j 
                </mi> 
               </mrow> 
               <mrow> 
                <mi>
                  t 
                </mi> 
                <mi>
                  r 
                </mi> 
                <mi>
                  a 
                </mi> 
                <mo>
                  , 
                </mo> 
                <mi>
                  u 
                </mi> 
                <mi>
                  p 
                </mi> 
               </mrow> 
              </msubsup> 
              <mrow> 
               <mo>
                 ( 
               </mo> 
               <mi>
                 t 
               </mi> 
               <mo>
                 ) 
               </mo> 
              </mrow> 
              <mo>
                + 
              </mo> 
              <msub> 
               <mi>
                 E 
               </mi> 
               <mrow> 
                <mi>
                  i 
                </mi> 
                <mo>
                  , 
                </mo> 
                <mi>
                  j 
                </mi> 
                <mo>
                  , 
                </mo> 
                <mi>
                  o 
                </mi> 
                <mi>
                  v 
                </mi> 
               </mrow> 
              </msub> 
              <mrow> 
               <mo>
                 ( 
               </mo> 
               <mi>
                 t 
               </mi> 
               <mo>
                 ) 
               </mo> 
              </mrow> 
              <mo>
                + 
              </mo> 
              <msub> 
               <mi>
                 E 
               </mi> 
               <mrow> 
                <mi>
                  i 
                </mi> 
                <mo>
                  , 
                </mo> 
                <mi>
                  j 
                </mi> 
                <mo>
                  , 
                </mo> 
                <mi>
                  v 
                </mi> 
               </mrow> 
              </msub> 
              <mrow> 
               <mo>
                 ( 
               </mo> 
               <mi>
                 t 
               </mi> 
               <mo>
                 ) 
               </mo> 
              </mrow> 
              <mo>
                + 
              </mo> 
              <msubsup> 
               <mi>
                 E 
               </mi> 
               <mrow> 
                <mi>
                  i 
                </mi> 
                <mo>
                  , 
                </mo> 
                <mi>
                  j 
                </mi> 
               </mrow> 
               <mi>
                 L 
               </mi> 
              </msubsup> 
              <mrow> 
               <mo>
                 ( 
               </mo> 
               <mi>
                 t 
               </mi> 
               <mo>
                 ) 
               </mo> 
              </mrow> 
             </mrow> 
            </mstyle> 
           </mrow> 
          </mstyle> 
         </mrow> 
        </math> and equation 
        <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
          <mi>
            T 
          </mi> 
          <mrow> 
           <mo>
             ( 
           </mo> 
           <mi>
             t 
           </mi> 
           <mo>
             ) 
           </mo> 
          </mrow> 
          <mo>
            = 
          </mo> 
          <mstyle displaystyle="true"> 
           <munderover> 
            <mo>
              ∑ 
            </mo> 
            <mrow> 
             <mi>
               i 
             </mi> 
             <mo>
               = 
             </mo> 
             <mn>
               1 
             </mn> 
            </mrow> 
            <mi>
              s 
            </mi> 
           </munderover> 
           <mrow> 
            <mstyle displaystyle="true"> 
             <munderover> 
              <mo>
                ∑ 
              </mo> 
              <mrow> 
               <mi>
                 j 
               </mi> 
               <mo>
                 = 
               </mo> 
               <mn>
                 1 
               </mn> 
              </mrow> 
              <mi>
                b 
              </mi> 
             </munderover> 
             <mrow> 
              <msub> 
               <mi>
                 T 
               </mi> 
               <mrow> 
                <mi>
                  i 
                </mi> 
                <mo>
                  , 
                </mo> 
                <mi>
                  j 
                </mi> 
               </mrow> 
              </msub> 
              <mrow> 
               <mo>
                 ( 
               </mo> 
               <mi>
                 t 
               </mi> 
               <mo>
                 ) 
               </mo> 
              </mrow> 
             </mrow> 
            </mstyle> 
           </mrow> 
          </mstyle> 
         </mrow> 
        </math>.</p><p style="text-align:justify">20: Send the action to the environment, obtain the reward 
        <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
          <msub> 
           <mi>
             r 
           </mi> 
           <mrow> 
            <mi>
              i 
            </mi> 
            <mo>
              , 
            </mo> 
            <mi>
              j 
            </mi> 
           </mrow> 
          </msub> 
         </mrow> 
        </math> by equation (3) and find the next state 
        <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
          <mi>
            s 
          </mi> 
          <mrow> 
           <mo>
             ( 
           </mo> 
           <mrow> 
            <mi>
              t 
            </mi> 
            <mo>
              + 
            </mo> 
            <mn>
              1 
            </mn> 
           </mrow> 
           <mo>
             ) 
           </mo> 
          </mrow> 
         </mrow> 
        </math></p><p style="text-align:justify">21: Store the observation, action, reward, and next state of each intelligence in the experience replay buffer D</p><p style="text-align:justify">22: If the size of the experience playback buffer D is larger than the batch size batch_size:</p><p style="text-align:justify">23: For each intelligence i:</p><p style="text-align:justify">24 Draw a random batch sample 
        <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
          <mrow> 
           <mo>
             { 
           </mo> 
           <mrow> 
            <mi>
              s 
            </mi> 
            <mrow> 
             <mo>
               ( 
             </mo> 
             <mi>
               t 
             </mi> 
             <mo>
               ) 
             </mo> 
            </mrow> 
            <mo>
              , 
            </mo> 
            <msub> 
             <mi>
               a 
             </mi> 
             <mrow> 
              <mi>
                i 
              </mi> 
              <mo>
                , 
              </mo> 
              <mi>
                j 
              </mi> 
             </mrow> 
            </msub> 
            <mrow> 
             <mo>
               ( 
             </mo> 
             <mi>
               t 
             </mi> 
             <mo>
               ) 
             </mo> 
            </mrow> 
            <mo>
              , 
            </mo> 
            <msub> 
             <mi>
               r 
             </mi> 
             <mrow> 
              <mi>
                i 
              </mi> 
              <mo>
                , 
              </mo> 
              <mi>
                j 
              </mi> 
             </mrow> 
            </msub> 
            <mrow> 
             <mo>
               ( 
             </mo> 
             <mi>
               t 
             </mi> 
             <mo>
               ) 
             </mo> 
            </mrow> 
            <mo>
              , 
            </mo> 
            <mi>
              s 
            </mi> 
            <mrow> 
             <mo>
               ( 
             </mo> 
             <mrow> 
              <mi>
                t 
              </mi> 
              <mo>
                + 
              </mo> 
              <mn>
                1 
              </mn> 
             </mrow> 
             <mo>
               ) 
             </mo> 
            </mrow> 
           </mrow> 
           <mo>
             } 
           </mo> 
          </mrow> 
         </mrow> 
        </math> from D</p><p style="text-align:justify">25: Calculate the target value</p><p style="text-align:justify">26: Update the critical network parameters 
        <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
          <msup> 
           <mi>
             θ 
           </mi> 
           <mi>
             Q 
           </mi> 
          </msup> 
         </mrow> 
        </math> to minimize the loss 
        <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
          <mi>
            L 
          </mi> 
          <mo>
            = 
          </mo> 
          <msup> 
           <mrow> 
            <mrow> 
             <mo>
               ( 
             </mo> 
             <mrow> 
              <msub> 
               <mi>
                 y 
               </mi> 
               <mrow> 
                <mi>
                  i 
                </mi> 
                <mo>
                  , 
                </mo> 
                <mi>
                  j 
                </mi> 
               </mrow> 
              </msub> 
              <mo>
                − 
              </mo> 
              <mi>
                Q 
              </mi> 
              <mrow> 
               <mo>
                 ( 
               </mo> 
               <mrow> 
                <mi>
                  s 
                </mi> 
                <mrow> 
                 <mo>
                   ( 
                 </mo> 
                 <mi>
                   t 
                 </mi> 
                 <mo>
                   ) 
                 </mo> 
                </mrow> 
                <mo>
                  , 
                </mo> 
                <msub> 
                 <mi>
                   a 
                 </mi> 
                 <mrow> 
                  <mi>
                    i 
                  </mi> 
                  <mo>
                    , 
                  </mo> 
                  <mi>
                    j 
                  </mi> 
                 </mrow> 
                </msub> 
                <mrow> 
                 <mo>
                   ( 
                 </mo> 
                 <mi>
                   t 
                 </mi> 
                 <mo>
                   ) 
                 </mo> 
                </mrow> 
                <mo>
                  , 
                </mo> 
                <msup> 
                 <mi>
                   θ 
                 </mi> 
                 <mi>
                   Q 
                 </mi> 
                </msup> 
               </mrow> 
               <mo>
                 ) 
               </mo> 
              </mrow> 
             </mrow> 
             <mo>
               ) 
             </mo> 
            </mrow> 
           </mrow> 
           <mn>
             2 
           </mn> 
          </msup> 
         </mrow> 
        </math></p><p style="text-align:justify">27: Update actor network parameters using gradient descent algorithm 
        <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
          <msup> 
           <mi>
             θ 
           </mi> 
           <mi>
             π 
           </mi> 
          </msup> 
         </mrow> 
        </math></p><p style="text-align:justify">28: Update target network parameters:</p><p style="text-align:justify">29: 
        <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
          <msubsup> 
           <mi>
             θ 
           </mi> 
           <mrow> 
            <mi>
              t 
            </mi> 
            <mi>
              a 
            </mi> 
            <mi>
              r 
            </mi> 
            <mi>
              g 
            </mi> 
            <mi>
              e 
            </mi> 
            <mi>
              t 
            </mi> 
           </mrow> 
           <mi>
             π 
           </mi> 
          </msubsup> 
          <mo>
            = 
          </mo> 
          <mi>
            τ 
          </mi> 
          <msup> 
           <mi>
             θ 
           </mi> 
           <mi>
             π 
           </mi> 
          </msup> 
          <mo>
            + 
          </mo> 
          <mrow> 
           <mo>
             ( 
           </mo> 
           <mrow> 
            <mn>
              1 
            </mn> 
            <mo>
              − 
            </mo> 
            <mi>
              τ 
            </mi> 
           </mrow> 
           <mo>
             ) 
           </mo> 
          </mrow> 
          <msubsup> 
           <mi>
             θ 
           </mi> 
           <mrow> 
            <mi>
              t 
            </mi> 
            <mi>
              a 
            </mi> 
            <mi>
              r 
            </mi> 
            <mi>
              g 
            </mi> 
            <mi>
              e 
            </mi> 
            <mi>
              t 
            </mi> 
           </mrow> 
           <mi>
             π 
           </mi> 
          </msubsup> 
         </mrow> 
        </math></p><p style="text-align:justify">30: 
        <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
          <msubsup> 
           <mi>
             θ 
           </mi> 
           <mrow> 
            <mi>
              t 
            </mi> 
            <mi>
              a 
            </mi> 
            <mi>
              r 
            </mi> 
            <mi>
              g 
            </mi> 
            <mi>
              e 
            </mi> 
            <mi>
              t 
            </mi> 
           </mrow> 
           <mi>
             Q 
           </mi> 
          </msubsup> 
          <mo>
            = 
          </mo> 
          <mi>
            τ 
          </mi> 
          <msup> 
           <mi>
             θ 
           </mi> 
           <mi>
             π 
           </mi> 
          </msup> 
          <mo>
            + 
          </mo> 
          <mrow> 
           <mo>
             ( 
           </mo> 
           <mrow> 
            <mn>
              1 
            </mn> 
            <mo>
              − 
            </mo> 
            <mi>
              τ 
            </mi> 
           </mrow> 
           <mo>
             ) 
           </mo> 
          </mrow> 
          <msubsup> 
           <mi>
             θ 
           </mi> 
           <mrow> 
            <mi>
              t 
            </mi> 
            <mi>
              a 
            </mi> 
            <mi>
              r 
            </mi> 
            <mi>
              g 
            </mi> 
            <mi>
              e 
            </mi> 
            <mi>
              t 
            </mi> 
           </mrow> 
           <mi>
             Q 
           </mi> 
          </msubsup> 
         </mrow> 
        </math></p><p style="text-align:justify">31: Output: optimal policy</p></td> 
     </tr> 
    </table>
    <p>In this algorithm, the environment first interacts with each intelligence, and then the environment allocates tasks based on the actions returned by the intelligences. After all the intelligences have generated actions, the computational resources for different tasks are allocated based on the size of the tasks that are offloaded to the MEC server. Finally, the reward for each task is obtained.</p>
   </sec>
  </sec><sec id="s4">
   <title>4. Simulation Results and Analyses</title>
   <p>
    <xref ref-type="bibr" rid="scirp.134131-"></xref>This paper presents a series of simulation results that validate the advantages of the MADDPGDCO algorithm proposed in this study in comparison to the baseline algorithm used for simulation. The algorithm and simulations proposed in this study are written and implemented in the Python language. The environment used for simulation is PyCharm Professional 2022.3.3. In the paper, simulation experiments are carried out using the Python language through the Anaconda platform. Three square edge computing service networks with a length and width of 500 are simulated. The parameters required for the experimental simulation environment are shown in <xref ref-type="table" rid="table1">
     Table 1
    </xref>, while the parameters in the network are set out in <xref ref-type="table" rid="table2">
     Table 2
    </xref>.</p>
   <sec id="s4_1">
    <title>
     <xref ref-type="bibr" rid="scirp.134131-"></xref>4.1. Simulation Settings</title>
    <p>In this study, the following schemes will be used as baseline algorithms for comparison tests:</p>
    <p>1) Proximal Policy Optimization (PPO) algorithm</p>
    <p>2) Deep deterministic policy gradient algorithm</p>
    <p>3) Deep Q-network</p>
    <table-wrap id="table1">
     <label>
      <xref ref-type="table" rid="table1">
       Table 1
      </xref></label>
     <caption>
      <title>
       <xref ref-type="bibr" rid="scirp.134131-"></xref>Table 1. Major environmental parameters.</title>
     </caption>
     <table class="MsoTableGrid custom-table" border="0" cellspacing="0" cellpadding="0"> 
      <tr> 
       <td class="custom-bottom-td aleft" width="73.71%"><p style="text-align:left">Parameter name</p></td> 
       <td class="custom-bottom-td aleft" width="26.29%"><p style="text-align:left">Parameter setting</p></td> 
      </tr> 
      <tr> 
       <td class="custom-top-td aleft" width="73.71%"><p style="text-align:left">Number of cells s</p></td> 
       <td class="custom-top-td aleft" width="26.29%"><p style="text-align:left">3</p></td> 
      </tr> 
      <tr> 
       <td class="aleft" width="73.71%"><p style="text-align:left">Number of users per cell</p></td> 
       <td class="aleft" width="26.29%"><p style="text-align:left">20</p></td> 
      </tr> 
      <tr> 
       <td class="aleft" width="73.71%"><p style="text-align:left">Maximum bandwidth for a single channel</p></td> 
       <td class="aleft" width="26.29%"><p style="text-align:left">20 MHz</p></td> 
      </tr> 
      <tr> 
       <td class="aleft" width="73.71%"><p style="text-align:left">Maximum power of the MEC server</p></td> 
       <td class="aleft" width="26.29%"><p style="text-align:left">1000 Wh</p></td> 
      </tr> 
      <tr> 
       <td class="aleft" width="73.71%"><p style="text-align:left">Total amount of memory of the edge computing server</p></td> 
       <td class="aleft" width="26.29%"><p style="text-align:left">8 GB</p></td> 
      </tr> 
      <tr> 
       <td class="aleft" width="73.71%"><p style="text-align:left">Upload power of end users</p></td> 
       <td class="aleft" width="26.29%"><p style="text-align:left">16 W</p></td> 
      </tr> 
      <tr> 
       <td class="aleft" width="73.71%"><p style="text-align:left">Maximum amount of data generated by users for a single task</p></td> 
       <td class="aleft" width="26.29%"><p style="text-align:left">2 GB</p></td> 
      </tr> 
      <tr> 
       <td class="aleft" width="73.71%"><p style="text-align:left">Noise index</p></td> 
       <td class="aleft" width="26.29%"><p style="text-align:left">9 dB</p></td> 
      </tr> 
      <tr> 
       <td class="aleft" width="73.71%"><p style="text-align:left">Computing frequency of end users</p></td> 
       <td class="aleft" width="26.29%"><p style="text-align:left">2 GHz</p></td> 
      </tr> 
      <tr> 
       <td class="aleft" width="73.71%"><p style="text-align:left">Computing frequency of edge computing server</p></td> 
       <td class="aleft" width="26.29%"><p style="text-align:left">4 GHz</p></td> 
      </tr> 
      <tr> 
       <td class="aleft" width="73.71%"><p style="text-align:left">End-user processing power</p></td> 
       <td class="aleft" width="26.29%"><p style="text-align:left">20 W</p></td> 
      </tr> 
      <tr> 
       <td class="aleft" width="73.71%"><p style="text-align:left">Edge computing server processing power</p></td> 
       <td class="aleft" width="26.29%"><p style="text-align:left">40 W</p></td> 
      </tr> 
      <tr> 
       <td class="aleft" width="73.71%"><p style="text-align:left">Edge computing server receive power</p></td> 
       <td class="aleft" width="26.29%"><p style="text-align:left">10 W</p></td> 
      </tr> 
     </table>
    </table-wrap>
    <table-wrap id="table2">
     <label>
      <xref ref-type="table" rid="table2">
       Table 2
      </xref></label>
     <caption>
      <title>
       <xref ref-type="bibr" rid="scirp.134131-"></xref>Table 2. MADDPGDOC network training parameters.</title>
     </caption>
     <table class="MsoTableGrid custom-table" border="0" cellspacing="0" cellpadding="0"> 
      <tr> 
       <td class="custom-bottom-td aleft" width="73.50%"><p style="text-align:left">Parameter name</p></td> 
       <td class="custom-bottom-td aleft" width="26.50%"><p style="text-align:left">Parameter setting</p></td> 
      </tr> 
      <tr> 
       <td class="custom-top-td aleft" width="73.50%"><p style="text-align:left">Experience pool size</p></td> 
       <td class="custom-top-td aleft" width="26.50%"><p style="text-align:left">1e6</p></td> 
      </tr> 
      <tr> 
       <td class="aleft" width="73.50%"><p style="text-align:left">Batch size v</p></td> 
       <td class="aleft" width="26.50%"><p style="text-align:left">256</p></td> 
      </tr> 
      <tr> 
       <td class="aleft" width="73.50%"><p style="text-align:left">Activation function</p></td> 
       <td class="aleft" width="26.50%"><p style="text-align:left">Tanh</p></td> 
      </tr> 
      <tr> 
       <td class="aleft" width="73.50%"><p style="text-align:left">Optimizer</p></td> 
       <td class="aleft" width="26.50%"><p style="text-align:left">Adam</p></td> 
      </tr> 
      <tr> 
       <td class="aleft" width="73.50%"><p style="text-align:left">Actor network learning rate</p></td> 
       <td class="aleft" width="26.50%"><p style="text-align:left">1e−4</p></td> 
      </tr> 
      <tr> 
       <td class="aleft" width="73.50%"><p style="text-align:left">Critic network learning rate</p></td> 
       <td class="aleft" width="26.50%"><p style="text-align:left">1e−4</p></td> 
      </tr> 
      <tr> 
       <td class="aleft" width="73.50%"><p style="text-align:left">Discount factor</p></td> 
       <td class="aleft" width="26.50%"><p style="text-align:left">0.99</p></td> 
      </tr> 
      <tr> 
       <td class="aleft" width="73.50%"><p style="text-align:left">Update step size</p></td> 
       <td class="aleft" width="26.50%"><p style="text-align:left">10</p></td> 
      </tr> 
      <tr> 
       <td class="aleft" width="73.50%"><p style="text-align:left">Hidden layer size z</p></td> 
       <td class="aleft" width="26.50%"><p style="text-align:left">256</p></td> 
      </tr> 
      <tr> 
       <td class="aleft" width="73.50%"><p style="text-align:left">Number of training rounds e</p></td> 
       <td class="aleft" width="26.50%"><p style="text-align:left">500</p></td> 
      </tr> 
     </table>
    </table-wrap>
    <p>
     <xref ref-type="bibr" rid="scirp.134131-"></xref>The parameters required for the experimental simulation environment are shown in <xref ref-type="table" rid="table1">
      Table 1
     </xref> and the parameters in the network are set in <xref ref-type="table" rid="table2">
      Table 2
     </xref>.</p>
   </sec>
   <sec id="s4_2">
    <title>4.2. Simulation Results</title>
    <p>This paper presents a series of simulation results to demonstrate the advantages of the MADDPGDCO algorithm proposed in the study. Firstly, the study explores the proportion of task offloading allocated to other cell MECs in the optimization strategy of the algorithm. Secondly, the simulation compares the MADDPGDCO algorithm proposed in this paper with the baseline algorithm used in the simulation in terms of delay, energy consumption and reward.</p>
    <p>Firstly, the simulation studies the ratio of different task-based cell offloading and different cell offloading under this algorithm. As shown in <xref ref-type="fig" rid="fig1">
      Figure 1
     </xref>, the algorithm proposed in this paper fully achieves the joint offloading of MEC servers in different cells. From <xref ref-type="fig" rid="fig2">
      Figure 2
     </xref>, it can be seen that the MADDPGDCO algorithm proposed in this paper can effectively enable the MECs in different cells to process the tasks.</p>
    <fig id="fig2" position="float">
     <label>Figure 2</label>
     <caption>
      <title>Figure 2. Proportion of tasks synergistically offloaded.</title>
     </caption>
     <graphic mimetype="image" position="float" xlink:type="simple" xlink:href="https://html.scirp.org/file/1732761-rId226.jpeg?20240627024514" />
    </fig>
    <p>Secondly, the simulation examines the performance of delay, energy consumption and reward under different schemes. <xref ref-type="fig" rid="fig3">
      Figure 3
     </xref> illustrates the delay of different schemes after convergence. It can be observed that the average delay is approximately 9.5 ms for MADDPGDCO, 14.5 ms for PPO, 11 ms for MADDPGDCO and 20.2 ms for DQN.</p>
    <p>
     <xref ref-type="fig" rid="fig4">
      Figure 4
     </xref> illustrates the energy consumption of different schemes following convergence. It can be observed that the average energy consumption of MADDPGDCO is approximately 600 units, PPO is approximately 900 units, DDPG is approximately 760 units and DQN is approximately 980 units.</p>
    <p>
     <xref ref-type="fig" rid="fig5">
      Figure 5
     </xref> illustrates the comparative reward outcomes between MADDPGDCO and the baseline algorithm. The reward plots for training with different scenarios demonstrate that MADDPGDCO outperforms the baseline algorithm.</p>
    <fig id="fig3" position="float">
     <label>Figure 3</label>
     <caption>
      <title>Figure 3. Comparison of latency of MADDPGDCO with baseline algorithm.</title>
     </caption>
     <graphic mimetype="image" position="float" xlink:type="simple" xlink:href="https://html.scirp.org/file/1732761-rId227.jpeg?20240627024514" />
    </fig>
    <fig id="fig4" position="float">
     <label>Figure 4</label>
     <caption>
      <title>Figure 4. Comparison of energy consumption between MADDPGDCO and baseline algorithm.</title>
     </caption>
     <graphic mimetype="image" position="float" xlink:type="simple" xlink:href="https://html.scirp.org/file/1732761-rId228.jpeg?20240627024514" />
    </fig>
    <fig id="fig5" position="float">
     <label>Figure 5</label>
     <caption>
      <title>Figure 5. Comparison of MADDPGDCO and baseline algorithm rewards.</title>
     </caption>
     <graphic mimetype="image" position="float" xlink:type="simple" xlink:href="https://html.scirp.org/file/1732761-rId229.jpeg?20240627024514" />
    </fig>
   </sec>
  </sec><sec id="s5">
   <title>5. Conclusions</title>
   <p>In this paper, we address the problem of joint optimization of task offloading and resource allocation for multi-cell, multi-user and multi-server. First, this paper provides a detailed analysis of channel resource allocation and determines the optimal channel allocation scheme. In terms of computational offloading, this paper works on minimizing the weighted sum of energy consumption and delay as the optimization objective. To achieve this objective, the following parameters are co-optimized: the specific MEC servers to offload to, whether to offload further to MEC servers in other cells, the offload rate, and the ratio of arithmetic resource allocation. The co-optimization of these parameters aims to develop an efficient offloading strategy. In order to evaluate the performance of the proposed algorithm, the method in this paper is compared with other delay calculation methods. The experimental results show that the algorithm proposed in this paper reduces the delay by 5 ms compared to PPO, 1.5 ms compared to DDPG and 10.7 ms compared to DQN, and reduces the energy consumption by 300 compared to PPO, 760 compared to DDPG and 380 compared to DQN, which fully proves that the algorithm proposed in this paper has excellent performance.</p>
   <p>Although the algorithm proposed in this paper has a great advantage over the baseline algorithm, the algorithm proposed in this paper cannot adapt to the situation where the number of end users changes or the end users moves to other cells while uploading the task, and there are some limitations.</p>
  </sec>
 </body><back>
  <ref-list>
   <title>References</title>
   <ref id="scirp.134131-ref1">
    <label>1</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Zeng, S., Li, Z., Yu, H., Zhang, Z., Luo, L., Li, B., et al. (2023) Hfedms: Heterogeneous Federated Learning with Memorable Data Semantics in Industrial Metaverse. IEEE Transactions on Cloud Computing, 11, 3055-3069. &gt;https://doi.org/10.1109/tcc.2023.3254587
    </mixed-citation>
   </ref>
   <ref id="scirp.134131-ref2">
    <label>2</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Queralta, J.P., Qingqing, L., Zou, Z. and Westerlund, T. (2020). Enhancing Autonomy with Blockchain and Multi-Access Edge Computing in Distributed Robotic Systems. 2020 Fifth International Conference on Fog and Mobile Edge Computing (FMEC), Paris, 20-23 April 2020, 180-187. &gt;https://doi.org/10.1109/fmec49853.2020.9144809
    </mixed-citation>
   </ref>
   <ref id="scirp.134131-ref3">
    <label>3</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Ma, X.T., Zhao, J.H., Gong, Y., et al. (2017) Key Technologies of MEC towards 5G-Enabled Vehicular Networks. In: Wang, L., Qiu, T. and Zhao, W., Eds., Quality, Reliability, Security and Robustness in Heterogeneous Systems, Springer, 153-159.
    </mixed-citation>
   </ref>
   <ref id="scirp.134131-ref4">
    <label>4</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Andrews, J.G., Claussen, H., Dohler, M., Rangan, S. and Reed, M.C. (2012) Femtocells: Past, Present, and Future. IEEE Journal on Selected Areas in Communications, 30, 497-508. &gt;https://doi.org/10.1109/jsac.2012.120401
    </mixed-citation>
   </ref>
   <ref id="scirp.134131-ref5">
    <label>5</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Dhillon, H.S., Ganti, R.K., Baccelli, F. and Andrews, J.G. (2012) Modeling and Analysis of K-Tier Downlink Heterogeneous Cellular Networks. IEEE Journal on Selected Areas in Communications, 30, 550-560. &gt;https://doi.org/10.1109/jsac.2012.120405
    </mixed-citation>
   </ref>
   <ref id="scirp.134131-ref6">
    <label>6</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Wu, T., Xu, L. and Liu, C. (2020) Research on 5G MEC Edge Intelligence Architecture. Information and Communication Technology, 14, 46-49. (In Chinese)
    </mixed-citation>
   </ref>
   <ref id="scirp.134131-ref7">
    <label>7</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Ge, H.B., Feng, A.Q. and Wang, Y. (2020) Offloading Strategy for Workflow Tasks in 5G Edge Computing Environment. Sensors and Microsystems, 39, 130-133, 137. (In Chinese)
    </mixed-citation>
   </ref>
   <ref id="scirp.134131-ref8">
    <label>8</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Xu, Z., Liang, W., Xu, W., Jia, M. and Guo, S. (2016) Efficient Algorithms for Capacitated Cloudlet Placements. IEEE Transactions on Parallel and Distributed Systems, 27, 2866-2880. &gt;https://doi.org/10.1109/tpds.2015.2510638
    </mixed-citation>
   </ref>
   <ref id="scirp.134131-ref9">
    <label>9</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Zhu, X., Jia, Z., Pang, X. and Zhao, S. (2024) Joint Optimization of Task Caching and Computation Offloading for Multiuser Multitasking in Mobile Edge Computing. Electronics, 13, Article No. 389. &gt;https://doi.org/10.3390/electronics13020389
    </mixed-citation>
   </ref>
   <ref id="scirp.134131-ref10">
    <label>10</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Yu, B.W., Pu, L.J., Xie, Y.T., et al. (2018) Research on Mobile Edge Computing Task Offloading and Base Station Association Collaborative Decision-Making Problem. Computer Research and Development, 55, 537-550. (In Chinese)
    </mixed-citation>
   </ref>
   <ref id="scirp.134131-ref11">
    <label>11</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Liu, G.Q., Zhang, X.X., Ma, H.Y. and Yan, H. (2023) A Computational Task Offloading Algorithm for Multi-Edge Node Scenarios. Information and Control, 52, 679-688. (In Chinese)
    </mixed-citation>
   </ref>
   <ref id="scirp.134131-ref12">
    <label>12</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Chen, Z. and Gong, B.C. (2024) UAV-Assisted Two-Layer Deep Reinforcement Learning Task Offloading Algorithm. Computer Applications Research, 41, 426-431. (In Chinese)
    </mixed-citation>
   </ref>
   <ref id="scirp.134131-ref13">
    <label>13</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Sun, Y., Wei, T., Li, H., Zhang, Y. and Wu, W. (2020) Energy-Efficient Multimedia Task Assignment and Computing Offloading for Mobile Edge Computing Networks. IEEE Access, 8, 36702-36713. &gt;https://doi.org/10.1109/access.2020.2973359
    </mixed-citation>
   </ref>
   <ref id="scirp.134131-ref14">
    <label>14</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Zhou, H., Jiang, K., Liu, X., Li, X. and Leung, V.C.M. (2022) Deep Reinforcement Learning for Energy-Efficient Computation Offloading in Mobile-Edge Computing. IEEE Internet of Things Journal, 9, 1517-1530. &gt;https://doi.org/10.1109/jiot.2021.3091142
    </mixed-citation>
   </ref>
   <ref id="scirp.134131-ref15">
    <label>15</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Chen, X., Ge, H., Liu, L., Li, S., Han, J. and Gong, H. (2021). Computing Offloading Decision Based on DDPG Algorithm in Mobile Edge Computing. 2021 IEEE 6th International Conference on Cloud Computing and Big Data Analytics (ICCCBDA), Chengdu, 24-26 April 2021, 391-399. &gt;https://doi.org/10.1109/icccbda51879.2021.9442599
    </mixed-citation>
   </ref>
   <ref id="scirp.134131-ref16">
    <label>16</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Zhao, N., Ye, Z., Pei, Y., Liang, Y. and Niyato, D. (2022) Multi-Agent Deep Reinforcement Learning for Task Offloading in UAV-Assisted Mobile Edge Computing. IEEE Transactions on Wireless Communications, 21, 6949-6960. &gt;https://doi.org/10.1109/twc.2022.3153316
    </mixed-citation>
   </ref>
   <ref id="scirp.134131-ref17">
    <label>17</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Tong, M., Wang, X., Li, S. and Peng, L. (2022) Joint Offloading Decision and Resource Allocation in Mobile Edge Computing-Enabled Satellite-Terrestrial Network. Symmetry, 14, Article No. 564. &gt;https://doi.org/10.3390/sym14030564
    </mixed-citation>
   </ref>
   <ref id="scirp.134131-ref18">
    <label>18</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Yeganeh, S., Babazadeh Sangar, A. and Azizi, S. (2023) A Novel Q-Learning-Based Hybrid Algorithm for the Optimal Offloading and Scheduling in Mobile Edge Computing Environments. Journal of Network and Computer Applications, 214, Article ID: 103617. &gt;https://doi.org/10.1016/j.jnca.2023.103617
    </mixed-citation>
   </ref>
   <ref id="scirp.134131-ref19">
    <label>19</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Zaman, S.K.u., Jehangiri, A.I., Maqsood, T., Haq, N.u., Umar, A.I., Shuja, J., et al. (2022) Limpo: Lightweight Mobility Prediction and Offloading Framework Using Machine Learning for Mobile Edge Computing. Cluster Computing, 26, 99-117. &gt;https://doi.org/10.1007/s10586-021-03518-7
    </mixed-citation>
   </ref>
   <ref id="scirp.134131-ref20">
    <label>20</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Wu, H., Geng, J., Bai, X. and Jin, S. (2024) Deep Reinforcement Learning-Based Online Task Offloading in Mobile Edge Computing Networks. Information Sciences, 654, Article ID: 119849. &gt;https://doi.org/10.1016/j.ins.2023.119849
    </mixed-citation>
   </ref>
   <ref id="scirp.134131-ref21">
    <label>21</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Lowe, R., Wu, Y.I., Tamar, A., et al. (2017) Multi-Agent Actor-Critic for Mixed Cooperative-Competitive Environments. Proceedings of the 31st International Conference on Neural Information Processing Systems, Long Beach, 4-9 December 2017, 6382-6393.
    </mixed-citation>
   </ref>
  </ref-list>
 </back>
</article>