Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge branch 'wifi_clean' into 'master'
[simgrid.git] / src / surf / network_cm02.cpp
index 8ef4943..4ec1f66 100644 (file)
@@ -225,19 +225,22 @@ void NetworkCm02Model::comm_action_expand_constraints(const s4u::Host* src, cons
 
   /* WI-FI links needs special treatment, do it here */
   if (src_wifi_link != nullptr) {
-    /* In case of 0Mbps data rate, don't consider it in the LMM */
     if (src_wifi_link->get_host_rate(src) > 0)
       get_maxmin_system()->expand(src_wifi_link->get_constraint(), action->get_variable(),
                                   1.0 / src_wifi_link->get_host_rate(src));
-    else
+    else {
       get_maxmin_system()->update_variable_penalty(action->get_variable(), 0);
+    }
   }
+
   if (dst_wifi_link != nullptr) {
     if (dst_wifi_link->get_host_rate(dst) > 0)
       get_maxmin_system()->expand(dst_wifi_link->get_constraint(), action->get_variable(),
                                   1.0 / dst_wifi_link->get_host_rate(dst));
-    else
+    else {
       get_maxmin_system()->update_variable_penalty(action->get_variable(), 0);
+    }
+
   }
 
   for (auto const* link : route) {