aboutsummaryrefslogtreecommitdiff
path: root/src/ats/plugin_ats_ril.c
diff options
context:
space:
mode:
authorMatthias Wachs <wachs@net.in.tum.de>2014-06-25 15:35:29 +0000
committerMatthias Wachs <wachs@net.in.tum.de>2014-06-25 15:35:29 +0000
commit9f4e26c9067eb5771b7dbcb2a672d685e559f1f7 (patch)
tree5a04682ceaad090f49413aecbe40e0750360fd8d /src/ats/plugin_ats_ril.c
parent678fae38a93164db4b1c51127a5d9382d4d7a861 (diff)
forgotten commit making penalty quadratic as used and documented
Diffstat (limited to 'src/ats/plugin_ats_ril.c')
-rw-r--r--src/ats/plugin_ats_ril.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/ats/plugin_ats_ril.c b/src/ats/plugin_ats_ril.c
index 03bddad501..35812029c6 100644
--- a/src/ats/plugin_ats_ril.c
+++ b/src/ats/plugin_ats_ril.c
@@ -1047,7 +1047,8 @@ envi_get_penalty (struct GAS_RIL_Handle *solver, struct RIL_Peer_Agent *agent)
over_in = net->bw_in_utilized - net->bw_in_available;
if (RIL_ACTION_BW_IN_INC == agent->a_old)
{
- over_in *= 2;
+ /* increase quadratically */
+ over_in *= over_in;
}
}
if (net->bw_out_utilized > net->bw_out_available)
@@ -1055,10 +1056,11 @@ envi_get_penalty (struct GAS_RIL_Handle *solver, struct RIL_Peer_Agent *agent)
over_out = net->bw_out_utilized - net->bw_out_available;
if (RIL_ACTION_BW_OUT_INC == agent->a_old)
{
- over_out *= 2;
+ /* increase quadratically */
+ over_out *= over_out;
}
}
- over_max = (over_in + over_out) / RIL_MIN_BW;
+ over_max = (over_in + over_out) / (RIL_MIN_BW * RIL_MIN_BW);
return -1.0 * (double) over_max;
}