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

Private GIT Repository
TESTS are ready to run!
[loba.git] / process.cpp
index 45d06211d7c830d475d4fa01d54c0315cc5c1f70..193c87b45bece83a183d446c7fec2280c2f4e748 100644 (file)
@@ -1,4 +1,5 @@
 #include <algorithm>
 #include <algorithm>
+#include <cmath>
 #include <functional>
 #include <iterator>
 #include <numeric>
 #include <functional>
 #include <iterator>
 #include <numeric>
@@ -305,6 +306,8 @@ void process::ctrl_send(neighbor& nb)
 
 double process::compute_load_to_send(double desired)
 {
 
 double process::compute_load_to_send(double desired)
 {
+    if (opt::integer_transfer)
+        desired = std::floor(desired);
     return desired >= opt::min_transfer_amount ? desired : 0.0;
 }
 
     return desired >= opt::min_transfer_amount ? desired : 0.0;
 }