4 XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(loba);
6 #include "loba_fairstrategy.h"
10 bool operator()(const neighbor*a, const neighbor*b) {
11 return a->get_load() > b->get_load();
15 void loba_fairstrategy::load_balance()
17 std::sort(pneigh.begin(), pneigh.end(), compare());
19 print_loads_p(false, xbt_log_priority_debug);
25 for (unsigned i = 0 ; i < pneigh.size() ; ++i) {
26 if (pneigh[i]->get_load() <= get_load() - .002) {
28 send(pneigh[i], .001);
29 DEBUG1("sent to %s", pneigh[i]->get_name());