Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge branch 'master' of scm.gforge.inria.fr:/gitroot/simgrid/simgrid
[simgrid.git] / src / surf / network_cm02.cpp
index d9057a4..91a4622 100644 (file)
@@ -136,22 +136,21 @@ NetworkCm02Model::NetworkCm02Model()
   :NetworkModel()
 {
   char *optim = xbt_cfg_get_string("network/optim");
-  int select = xbt_cfg_get_boolean("network/maxmin-selective-update");
+  bool select = xbt_cfg_get_boolean("network/maxmin-selective-update");
 
   if (!strcmp(optim, "Full")) {
     updateMechanism_ = UM_FULL;
     selectiveUpdate_ = select;
   } else if (!strcmp(optim, "Lazy")) {
     updateMechanism_ = UM_LAZY;
-    selectiveUpdate_ = 1;
-    xbt_assert((select == 1) || (xbt_cfg_is_default_value("network/maxmin-selective-update")),
-               "You cannot disable selective update while using the lazy update mechanism!");
+    selectiveUpdate_ = true;
+    xbt_assert(select || (xbt_cfg_is_default_value("network/maxmin-selective-update")),
+               "You cannot disable selective update when using the lazy update mechanism");
   } else {
     xbt_die("Unsupported optimization (%s) for this model. Accepted: Full, Lazy.", optim);
   }
 
-  if (!maxminSystem_)
-    maxminSystem_ = lmm_system_new(selectiveUpdate_);
+  maxminSystem_ = lmm_system_new(selectiveUpdate_);
 
   routing_model_create(createLink("__loopback__", 498000000, 0.000015, SURF_LINK_FATPIPE, nullptr));
 
@@ -387,11 +386,6 @@ Action *NetworkCm02Model::communicate(kernel::routing::NetCard *src, kernel::rou
   return action;
 }
 
-bool NetworkCm02Model::next_occuring_event_isIdempotent()
-{
-  return true;
-}
-
 void NetworkCm02Model::gapAppend(double size, const Link* link, NetworkAction* action)
 {
   // Nothing