Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge pull request #65 from fabienchaix/master
[simgrid.git] / src / surf / maxmin.cpp
index 7d48a90..385424c 100644 (file)
@@ -751,9 +751,12 @@ void lmm_print(lmm_system_t sys)
     }
     XBT_DEBUG("%s", trace_buf);
     trace_buf[0] = '\000';
-    xbt_assert(!double_positive(sum - cnst->bound, cnst->bound*sg_maxmin_precision),
-                "Incorrect value (%f is not smaller than %f): %g",
-                sum, cnst->bound, sum - cnst->bound);
+       xbt_assert(!double_positive(sum - cnst->bound, cnst->bound*sg_maxmin_precision),
+               "Incorrect value (%f is not smaller than %f): %g",
+                 sum, cnst->bound, sum - cnst->bound);
+       //if(double_positive(sum - cnst->bound, cnst->bound*sg_maxmin_precision))
+       //XBT_ERROR("Incorrect value (%f is not smaller than %f): %g",sum, cnst->bound, sum - cnst->bound);
+      
   }
 
   XBT_DEBUG("Variables");
@@ -841,7 +844,7 @@ void lmm_solve(lmm_system_t sys)
           sys->keep_track->push_back(*action);
       }
     }
-    XBT_DEBUG("Constraint '%d' usage: %f remaining: %f ", cnst->id_int, cnst->usage, cnst->remaining);
+    XBT_DEBUG("Constraint '%d' usage: %f remaining: %f concurrency: %i<=%i<=%i", cnst->id_int, cnst->usage, cnst->remaining,cnst->concurrency_current,cnst->concurrency_maximum,cnst->concurrency_limit);
     /* Saturated constraints update */
 
     if(cnst->usage > 0) {
@@ -891,7 +894,8 @@ void lmm_solve(lmm_system_t sys)
       if (min_bound < 0) {
   //If no variable could reach its bound, deal iteratively the constraints usage ( at worst one constraint is saturated at each cycle) 
         var->value = min_usage / var->weight;
-        XBT_DEBUG("Setting %p (%d) value to %f\n", var, var->id_int, var->value);
+       // XBT_DEBUG("Setting %p (%d) value to %f\n", var, var->id_int, var->value);
+        XBT_DEBUG("Setting var (%d) value to %f\n", var->id_int, var->value);
       } else {
   //If there exist a variable that can reach its bound, only update it (and other with the same bound) for now.
       if (double_equals(min_bound, var->bound*var->weight, sg_maxmin_precision)){
@@ -921,8 +925,10 @@ void lmm_solve(lmm_system_t sys)
           if(!double_positive(cnst->usage,sg_maxmin_precision) || !double_positive(cnst->remaining,cnst->bound*sg_maxmin_precision)) {
             if (cnst->cnst_light) {
               int index = (cnst->cnst_light-cnst_light_tab);
-              XBT_DEBUG("index: %d \t cnst_light_num: %d \t || \t cnst: %p \t cnst->cnst_light: %p \t cnst_light_tab: %p usage: %f remaining: %f bound: %f  ",
-      index,cnst_light_num, cnst, cnst->cnst_light, cnst_light_tab, cnst->usage, cnst->remaining, cnst->bound);
+              XBT_DEBUG("index: %d \t cnst_light_num: %d \t || usage: %f remaining: %f bound: %f  ",
+             index,cnst_light_num, cnst->usage, cnst->remaining, cnst->bound);
+             //              XBT_DEBUG("index: %d \t cnst_light_num: %d \t || \t cnst: %p \t cnst->cnst_light: %p \t cnst_light_tab: %p usage: %f remaining: %f bound: %f  ",
+             //index,cnst_light_num, cnst, cnst->cnst_light, cnst_light_tab, cnst->usage, cnst->remaining, cnst->bound);
               cnst_light_tab[index]=cnst_light_tab[cnst_light_num-1];
               cnst_light_tab[index].cnst->cnst_light = &cnst_light_tab[index];
               cnst_light_num--;