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

Private GIT Repository
Add forgotten files.
[loba.git] / options.cpp
index e9aa9b078b1b640677ebc3b9c9fb4e14ad217851..c0becfde198f7347b31ff3593c95447697975077 100644 (file)
@@ -9,13 +9,17 @@ XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(main);
 
 #include "deployment.h"
 #include "process.h"
-#include "loba_simple.h"
+#include "loba_besteffort.h"
 #include "loba_fairstrategy.h"
 #include "loba_makhoul.h"
+#include "loba_makhoul2.h"
+#include "loba_simple.h"
 #include "misc.h"
 
 #include "options.h"
 
+#define DATA_DESCR_WIDTH 42
+
 namespace opt {
 
     // Constants
@@ -68,10 +72,14 @@ namespace opt {
     loba_algorithms_type loba_algorithms;
     loba_algorithms_type::loba_algorithms_type()
     {
+        NOL_INSERT("besteffort", "balance with best effort strategy",
+                   loba_besteffort);
         NOL_INSERT("fairstrategy", "balance with fair strategy",
                    loba_fairstrategy);
         NOL_INSERT("makhoul", "balance with Makhoul's PhD algorithm",
                    loba_makhoul);
+        NOL_INSERT("makhoul2", "balance with Makhoul's source code",
+                   loba_makhoul2);
         NOL_INSERT("none", "no load-balancing (for testing only)",
                    process);
         NOL_INSERT("simple", "balance with least loaded neighbor",
@@ -135,10 +143,9 @@ const char* opt_helper::on_off(bool b)
 
 const char* opt_helper::descr(const char* str)
 {
-    const int descr_width = 40;
     std::string& res = descr_str;
     res = str;
-    res.resize(descr_width, '.');
+    res.resize(DATA_DESCR_WIDTH, '.');
     return res.c_str();
 }