4 XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(loba);
6 #include "loba_makhoul.h"
10 bool operator()(const neighbor*a, const neighbor*b) {
11 return a->get_load() < b->get_load();
15 void loba_makhoul::load_balance()
17 std::sort(pneigh.begin(), pneigh.end(), compare());
19 print_loads_p(false, xbt_log_priority_debug);
21 double alpha = 1.0 / (pneigh.size() + 1.0);
25 (delta = get_load() - pneigh[i]->get_load()) > 0.0 ;
27 send(pneigh[i], delta * alpha);