From: Raphael Couturier Date: Fri, 17 Dec 2010 14:52:44 +0000 (+0100) Subject: modif simple X-Git-Tag: v0.1~221 X-Git-Url: https://bilbo.iut-bm.univ-fcomte.fr/and/gitweb/loba.git/commitdiff_plain/ffea735548f5d4940dae32d8071a2676f6716ad0 modif simple --- diff --git a/loba_simple.cpp b/loba_simple.cpp index 2cf613f..d44a1de 100644 --- a/loba_simple.cpp +++ b/loba_simple.cpp @@ -29,9 +29,10 @@ double loba_simple::load_balance(double my_load) } if (imin != -1) { // found someone - double balance = (my_load - max) / 2; + double balance = (my_load - min) / 2; DEBUG6("%d:%g %d:%g %g %g", imin, min, imax, max, my_load, balance); pneigh[imin]->set_to_send(balance); + pneigh[imin]->set_load(min+balance); return balance; } else { return 0.0;