Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Do not request status if not requested by caller.
[simgrid.git] / src / surf / fair_bottleneck.c
index 47c070b..c7ebba8 100644 (file)
@@ -1,6 +1,5 @@
-/*     $Id$ */
-
-/* Copyright (c) 2007 Arnaud Legrand. All rights reserved.               */
+/* Copyright (c) 2007, 2008, 2009, 2010. The SimGrid Team.
+ * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
@@ -97,7 +96,8 @@ void bottleneck_solve(lmm_system_t sys)
       xbt_swag_foreach(elem, elem_list) {
         if (elem->variable->weight <= 0)
           break;
-        if ((elem->value > 0) && xbt_swag_belongs(elem->variable, var_list))
+        if ((elem->value > 0)
+            && xbt_swag_belongs(elem->variable, var_list))
           nb++;
       }
       DEBUG1("\tThere are %d variables", nb);
@@ -115,7 +115,8 @@ void bottleneck_solve(lmm_system_t sys)
     }
 
     xbt_swag_foreach_safe(var, var_next, var_list) {
-      double min_inc = var->cnsts[0].constraint->usage / var->cnsts[0].value;
+      double min_inc =
+          var->cnsts[0].constraint->usage / var->cnsts[0].value;
       for (i = 1; i < var->cnsts_number; i++) {
         lmm_element_t elm = &var->cnsts[i];
         min_inc = MIN(min_inc, elm->constraint->usage / elm->value);
@@ -138,12 +139,14 @@ void bottleneck_solve(lmm_system_t sys)
           break;
         if (cnst->shared) {
           DEBUG4("\tUpdate constraint %p (%g) with variable %p by %g",
-                 cnst, cnst->remaining, elem->variable, elem->variable->mu);
-          double_update(&(cnst->remaining), elem->value * elem->variable->mu);
+                 cnst, cnst->remaining, elem->variable,
+                 elem->variable->mu);
+          double_update(&(cnst->remaining),
+                        elem->value * elem->variable->mu);
         } else {
           DEBUG4
-            ("\tNon-Shared variable. Update constraint usage of %p (%g) with variable %p by %g",
-             cnst, cnst->usage, elem->variable, elem->variable->mu);
+              ("\tNon-Shared variable. Update constraint usage of %p (%g) with variable %p by %g",
+               cnst, cnst->usage, elem->variable, elem->variable->mu);
           cnst->usage = MIN(cnst->usage, elem->value * elem->variable->mu);
         }
       }