]> AND Private Git Repository - loba.git/blobdiff - loba_besteffort.cpp
Logo AND Algorithmique Numérique Distribuée

Private GIT Repository
Add support for a constant random, for testing.
[loba.git] / loba_besteffort.cpp
index fa7273075397ebe1b673850c560e31f219c7a947..22343e0af364db111c148fc10abd50e2f1b8ea2a 100644 (file)
@@ -26,6 +26,8 @@ void loba_besteffort::load_balance()
     double mean = sum / (bound + 1);
     for (unsigned i = 0 ; i < bound ; ++i) {
         double transfer = mean - pneigh[i]->get_load();
     double mean = sum / (bound + 1);
     for (unsigned i = 0 ; i < bound ; ++i) {
         double transfer = mean - pneigh[i]->get_load();
+        if (opt::option_x)
+            transfer /= opt::option_x; // HACK!!!
         send(pneigh[i], transfer);
         XBT_DEBUG("sent %g to %s", transfer, pneigh[i]->get_name());
     }
         send(pneigh[i], transfer);
         XBT_DEBUG("sent %g to %s", transfer, pneigh[i]->get_name());
     }