Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
don't fool sonar if we can avoid it
authorMartin Quinson <martin.quinson@loria.fr>
Mon, 12 Dec 2016 14:30:04 +0000 (15:30 +0100)
committerMartin Quinson <martin.quinson@loria.fr>
Mon, 12 Dec 2016 14:30:04 +0000 (15:30 +0100)
src/surf/network_cm02.cpp

index 88b131c..26ba959 100644 (file)
@@ -368,7 +368,7 @@ Action* NetworkCm02Model::communicate(s4u::Host* src, s4u::Host* dst, double siz
   for (auto link: *route)
     lmm_expand(maxminSystem_, link->getConstraint(), action->getVariable(), 1.0);
 
-  if (sg_network_crosstraffic == 1) {
+  if (back_route != nullptr) { //  sg_network_crosstraffic was activated
     XBT_DEBUG("Fullduplex active adding backward flow using 5%%");
     for (auto link : *back_route)
       lmm_expand(maxminSystem_, link->getConstraint(), action->getVariable(), .05);