double neighborLoadMax = 0.0; // maximum load of neighbors to
// which something has been sent
for (unsigned i = 0;
- i < pneigh.size() && pneigh[i]->get_load() < get_load(); i++) {
+ i < pneigh.size() && pneigh[i]->get_load() < get_load(); ++i)
+ {
+
double delta = get_load() - pneigh[i]->get_load();
// do not violate ping-pong condition
double transfer = std::min(alpha * delta, get_load() - neighborLoadMax);
+ // note: alpha <= 1/2
XBT_DEBUG("delta = %g ; transfer = %g", delta, transfer);
send(pneigh[i], transfer);