// FIXME: I'm prototyping the algorithm, so there may be arrays and variables that carry redundant information here and in pre_processor_results struct.
intUE_id,CC_id,rbg,i;
intN_RB_DL,min_rb_unit,tm;
intowned,used;
UE_list_t*UE_list=&RC.mac[Mod_id]->UE_list;
UE_sched_ctrl*ue_sched_ctl;
COMMON_channels_t*cc;
intN_RBG[NFAPI_CC_MAX];
int8_tfree_rbgs_map[NFAPI_CC_MAX][N_RBG_MAX];
inthas_traffic[NFAPI_CC_MAX][MAX_NUM_SLICES];
uint8_tallocation_mask[NFAPI_CC_MAX][N_RBG_MAX];
uint16_t(*nb_rbs_remaining)[MAX_MOBILES_PER_ENB];
uint16_t(*nb_rbs_required)[MAX_MOBILES_PER_ENB];
uint8_t(*rballoc_sub)[N_RBG_MAX];
uint8_t(*MIMO_mode_indicator)[N_RBG_MAX];
// Initialize the free RBGs map
// free_rbgs_map[CC_id][rbg] = -1 if RBG is allocated,
// otherwise it contains the id of the slice it belongs to.
// (Information about slicing must be retained to deal with isolation).
// FIXME: This method does not consider RBGs that are free and belong to no slices