MCPcopy Create free account

hub / github.com/AlirezaShamsoshoara/Multi-Independent-Agent-Reinforcement-Learning-UAV-Autonomous-Spectrum-QLearning / functions

Functions31 in github.com/AlirezaShamsoshoara/Multi-Independent-Agent-Reinforcement-Learning-UAV-Autonomous-Spectrum-QLearning

↓ 15 callersFunctionnormalize
(d)
sensorsimulation.py:47
↓ 6 callersFunctiongetstateloc
This function returns the state based on the UAV's location. :param x_u: UAV's longitude :param y_u: UAV's latitude :param size:
statefromloc.py:15
↓ 2 callersFunctionget_general_loc_from_region
This function is the reverse of the previous function which means it converts the regional location to the global location. :param x_r
statefromloc.py:55
↓ 2 callersFunctionget_region_state_from_general
This function converts the UAV's state from the big and global grid to the smaller region also it returns the regional location as well.
statefromloc.py:39
↓ 2 callersFunctionreward_val_single
This function calculates reward for all UAVs based on the current and previous throughput values and considering the energy consumption as
gain_util_jain.py:15
↓ 2 callersFunctionupdate2d_figure
(prev_fig, location, width, region_length)
plotlocation.py:83
↓ 1 callersFunctionaction_exploit
This function is greedy exploitation based on the Q table history of each drone. It chooses the best action based on the experienced Q valu
action_sel.py:67
↓ 1 callersFunctionaction_explore
This function is the random exploration for the UAV and updates its current state and location based on the chosen random action :para
action_sel.py:19
↓ 1 callersFunctionfind_max_q_next_single
This function finds the maximum Q values for the UAV based on the new state that it moved to. :param qval: Q value matrix for the UAV
findq.py:15
↓ 1 callersFunctionfirst_part
()
sensorsimulation.py:55
↓ 1 callersFunctionget_csi
This function updates the CSI location based on the changed location of drones. :param num_UAV: Number of UAVs. :param location: The i
csi.py:96
↓ 1 callersFunctiongetlocstate
This function returns the UAV's current location based on the current state inside the region. :param state: UAV's current state :para
statefromloc.py:27
↓ 1 callersFunctioninit_energy
This function initializes the energy values for all drones and UAV randomly based on the energy config file :param num_UAV: Number of UAVs
energy.py:16
↓ 1 callersFunctionmain
()
sensorsimulation.py:703
↓ 1 callersFunctionrandom_primary_region
This function chooses a random region for the primary UAV :param region_ids: IDs of regions :return: random region for the primary (index
basestation.py:272
↓ 1 callersFunctionrandom_primary_uav
This function randomly chooses a UAV for the primary region and flies it and updates its residual energy. :param regions: Coordinates (center
basestation.py:189
↓ 1 callersFunctionrandom_secondary_uav_random_region
This function randomly chooses regions for the secondary network and randomly allocates the UAVs to those regions. :param num_uav: Number of
basestation.py:283
↓ 1 callersFunctionrandom_secondary_uav_search_region
This function randomly allocates UAVs to the secondary regions and updates their energy after flight. :param num_uav: Number of UAVs
basestation.py:213
↓ 1 callersFunctionregioncenter
This function calculates the center coordinates of each region. :param size: The global grid size :param region: Number of regions in the
basestation.py:20
↓ 1 callersFunctionsearch_primary_region
This function finds the best region for the primary UAV to relay the terrestrial users' data. :param regions: regions coordinates (centers)
basestation.py:46
↓ 1 callersFunctionsearch_primary_uav
This function finds the best UAV for the primary network after its flight considering the residual energy. :param regions: Coordinates (cente
basestation.py:65
↓ 1 callersFunctionsearch_secondary_uav
This function allocates secondary UAVs to the secondary regions based on the best allocation of residual energy. :param num_uav: Number of UA
basestation.py:99
↓ 1 callersFunctionsearch_secondary_uav_random_region
This function randomly chooses regions for the secondary network but allocates UAVs to them based on the best allocation. :param num_uav:
basestation.py:336
↓ 1 callersFunctionsecond_part
()
sensorsimulation.py:590
↓ 1 callersFunctionsingleutil
This function calculates the Amplify and forward throughput rate using the SNR for all UAVs and return all values. :param action: This is tas
utility_general.py:15
↓ 1 callersFunctionupdate_energy_movement
This function updates the UAVs' energy after choosing an action for the mobility. :param energy: The energy matrix(vector) for all UAVs :
energy.py:37
↓ 1 callersFunctionupdate_energy_transmission
This function updates the UAVs' energy after data transmission. :param energy: The energy matrix(vector) for all UAVs :param tran_rate: T
energy.py:53
Functionload_csi
This function generate the CSI parameters based on the LOS propagation model and the location of nodes at the beginning of the problem.
csi.py:20
Functionlocation
This function returns all random locations of UAVs and ground users based on the constraints. :param num_UAV: The number of UAVs :para
location_gen.py:18
Functionreopen_figure
(fig)
plotlocation.py:17
Functionupdate3d_figure
(prev_fig, location, height, width)
plotlocation.py:29