Total_Chn = 5;


%simulation parameters
Sim.snr_gap_dB = 6;
Sim.snr_gap = dB2dec(Sim.snr_gap_dB);
Sim.sqr_gap = 1.5;
Sim.sqr_gap_dB = dec2dB(Sim.sqr_gap);
Sim.noise_dBm = -162;
Sim.noise = dB2dec(Sim.noise_dBm);
Sim.Num_Cell = 1;%total num of cells
Sim.Num_BS = 9; %num base-stations per cell
Sim.Num_Macro = 3; %num macro base-stations
Sim.Num_Pico = 6; %num pico base-stations
Sim.Num_User = 60; %num users per cell
Sim.Num_Ant_Macro = 1; %num ant's per macro BS
Sim.Num_Ant_Pico = 1; %num ant's per pico BS
Sim.Num_Rx_Ant = 1;
Sim.B2Bdist = 0.8; %km
Sim.BW = 10e6;%bandwidth
Sim.P_max_Macro_dBm = 43 - dec2dB(Sim.BW); %dBm/Hz
Sim.P_max_Pico_dBm = 30 - dec2dB(Sim.BW); %dBm/Hz
Sim.MinWMMSEIter = 5; %minimum WMMSE iteration



for l=1:Total_Chn
    
    
    [Chn, BSLoc,PicoLoc,MULoc,dist,path_loss_dB,Num_BS,Num_User] = GenHetNetChnSingleCell(Sim);
    
    save_chn_name = sprintf('Chn%d_K%d.mat',l,Sim.Num_User);
    save(save_chn_name,'Chn', 'BSLoc','PicoLoc','MULoc','dist','path_loss_dB','Num_BS','Num_User');

end









