X-Git-Url: https://bilbo.iut-bm.univ-fcomte.fr/and/gitweb/loba.git/blobdiff_plain/7541e1aae11493fc2da5479f385154e78714397f..9380d7c32eed77c15a12068a4c37d78705271837:/loba_fairstrategy.cpp diff --git a/loba_fairstrategy.cpp b/loba_fairstrategy.cpp index 7495655..9942fac 100644 --- a/loba_fairstrategy.cpp +++ b/loba_fairstrategy.cpp @@ -29,10 +29,7 @@ double loba_fairstrategy::load_balance(double my_load) while (found) { found = false; for (unsigned i = 0 ; i < pneigh.size() ; ++i) { - double l = pneigh[i]->get_load(); - if (l >= my_load) - continue; - if (l < my_load + 2) { + if (pneigh[i]->get_load() <= my_load - 2) { found = true; pneigh[i]->add_load(1); pneigh[i]->add_to_send(1);