Abstract
5G and 6G development aim to fulfil very low latency, low energy consumption, and great computation ability. In the present era, the number of devices is increasing daily, which requires more communication and computation. Device-to-device (D2D), relay server, and mobile edge computing (MEC) systems were developed to meet these objectives. By employing the Constraint Based Multi-Dimensional Flux Balance Analysis (CBMDFBA) approach, this work aims to provide optimized overall energy consumption. Each device in this system can partially offload tasks to the Relay Edge Server (RES), Edge Server (ES), and adjacent mobile helper. Reinforcement learning is utilized to optimize the Signal's signal-to-noise ratio (SNR), decreasing transmission power between the helper, relay, and edge server. By employing CBMDFBA for path optimization, the approach reduces overall energy usage. In comparison to (1) Resource allocations using Q learning with considering parameter throughput-RA(QL-Munkres-TH), (2) Resource allocations using Q learning with considering parameter distance-RA(QL-Munkres-Dist), and (3) Resource allocation with considering maximum power-RA(Max-Power), the suggested method reduces energy consumption by 83.26%, 86.01%, and 88.34%, respectively. A comparison of energy efficiency and fairness index is also evaluated. According to simulation findings, the suggested algorithm outperforms baseline systems in terms of system performance and energy efficiency.