add fairness coefficient to UL.

master
Francisco Paisana 4 years ago
parent ea8ad153c4
commit f45d31d899

@ -165,7 +165,7 @@ void sched_time_pf::ue_ctxt::new_tti(const sched_cell_params_t& cell, sched_ue&
// calculate DL PF priority
float r = ue.get_expected_dl_bitrate(ue_cc_idx) / 8;
float R = dl_avg_rate();
dl_prio = (R != 0) ? pow(r, fairness_coeff) / R : (r == 0 ? 0 : std::numeric_limits<float>::max());
dl_prio = (R != 0) ? r / pow(R, fairness_coeff) : (r == 0 ? 0 : std::numeric_limits<float>::max());
}
// Calculate UL priority
@ -176,7 +176,7 @@ void sched_time_pf::ue_ctxt::new_tti(const sched_cell_params_t& cell, sched_ue&
if (ul_h != nullptr) {
float r = ue.get_expected_ul_bitrate(ue_cc_idx) / 8;
float R = ul_avg_rate();
ul_prio = (R != 0) ? r / R : (r == 0 ? 0 : std::numeric_limits<float>::max());
ul_prio = (R != 0) ? r / pow(R, fairness_coeff) : (r == 0 ? 0 : std::numeric_limits<float>::max());
}
}

Loading…
Cancel
Save