Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
I don't think it does what it should now but at least it looks better and
[simgrid.git] / src / surf / network.c
index 1f9f4c7..5e1be16 100644 (file)
@@ -127,7 +127,7 @@ static void parse_network_link(void)
 
   xbt_assert0((A_network_link_state==A_network_link_state_ON)||
              (A_network_link_state==A_network_link_state_OFF),
-             "Invalid state")
+             "Invalid state");
   if (A_network_link_state==A_network_link_state_ON) 
     state_initial = SURF_NETWORK_LINK_ON;
   else if (A_network_link_state==A_network_link_state_OFF) 
@@ -374,10 +374,10 @@ static void update_resource_state(void *id,
       action->lat_current += delta;
       if(action->rate<0)
        lmm_update_variable_bound(maxmin_system, action->variable,
-                                 SG_TCP_CTE_GAMMA / action->lat_current);
+                                 SG_TCP_CTE_GAMMA / (2.0 * action->lat_current));
       else 
        lmm_update_variable_bound(maxmin_system, action->variable,
-                                 min(action->rate,SG_TCP_CTE_GAMMA / action->lat_current));
+                                 min(action->rate,SG_TCP_CTE_GAMMA / (2.0 * action->lat_current)));
     }
   } else if (event_type == nw_link->state_event) {
     if (value > 0)
@@ -436,13 +436,13 @@ static surf_action_t communicate(void *src, void *dst, double size, double rate)
   if(action->rate<0) {
     if(action->lat_current>0)
       lmm_update_variable_bound(maxmin_system, action->variable,
-                               SG_TCP_CTE_GAMMA / action->lat_current);
+                               SG_TCP_CTE_GAMMA / (2.0 * action->lat_current));
     else
       lmm_update_variable_bound(maxmin_system, action->variable, -1.0);
   } else {
     if(action->lat_current>0)
       lmm_update_variable_bound(maxmin_system, action->variable,
-                               min(action->rate,SG_TCP_CTE_GAMMA / action->lat_current));
+                               min(action->rate,SG_TCP_CTE_GAMMA / (2.0 * action->lat_current)));
     else
       lmm_update_variable_bound(maxmin_system, action->variable, action->rate);
   }