from virtual_force import *
from main import *
class UE:
    def __init__(self):
        self.loc = [0, 0, 0]
        self.snrth = 0


class BS:
    def __init__(self):
        self.loc = [0, 0, 0]
        self.sort = 'UAV'
        self.power_upper = 0
        self.power_allocation = []  # 长度为用户数
        self.power_a2a = 0
        self.power = 0
        self.rate = 0
        self.rate_upper = 0
addr = r"D:\pycharm\va_position_power\location6.csv"
BS_list = read_UAVlist(addr)

ue_addr = r"D:\pycharm\va_position_power\data\list_ue100_1.csv"
link_addr = r"D:\pycharm\va_position_power\linkprocess_6.csv"
linked = read_linklist(link_addr)
linked_ = []
linked_.append(linked[0])
linked_.append(linked[1])
linked_.append(linked[2])
linked_.append(linked[5])
linked_.append(linked[3])
linked_.append(linked[4])
UE_list = read_UElist(ue_addr)

times = 0
print('开始联调')

print(linked)
draw_uavus_link_circle2(UE_list.copy(),BS_list.copy(),linked_,basecolor='red',size=40,name='resaved1_')
