Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Rename simgrid::kernel::lmm::s_lmm_element_t -> Element.
[simgrid.git] / src / surf / network_cm02.cpp
index 66a838f..43bc60e 100644 (file)
@@ -335,9 +335,9 @@ Action* NetworkCm02Model::communicate(s4u::Host* src, s4u::Host* dst, double siz
     for (auto const& link : back_route)
       maxminSystem_->expand(link->constraint(), action->getVariable(), .05);
 
-    //Change concurrency_share here, if you want that cross-traffic is included in the SURF concurrency
-    //(You would also have to change lmm_element_concurrency())
-    //lmm_variable_concurrency_share_set(action->getVariable(),2);
+    // Change concurrency_share here, if you want that cross-traffic is included in the SURF concurrency
+    // (You would also have to change simgrid::kernel::lmm::Element::get_concurrency())
+    // action->getVariable()->set_concurrency_share(2)
   }
   XBT_OUT();
 
@@ -379,9 +379,9 @@ void NetworkCm02Link::apply_event(tmgr_trace_event_t triggered, double value)
     if (value > 0)
       turnOn();
     else {
-      lmm_variable_t var = nullptr;
-      lmm_element_t elem = nullptr;
-      double now = surf_get_clock();
+      lmm_variable_t var       = nullptr;
+      const_lmm_element_t elem = nullptr;
+      double now               = surf_get_clock();
 
       turnOff();
       while ((var = constraint()->get_variable(&elem))) {
@@ -414,9 +414,9 @@ void NetworkCm02Link::setBandwidth(double value)
     double delta = sg_weight_S_parameter / value - sg_weight_S_parameter / (bandwidth_.peak * bandwidth_.scale);
 
     lmm_variable_t var;
-    lmm_element_t elem = nullptr;
-    lmm_element_t nextelem = nullptr;
-    int numelem = 0;
+    const_lmm_element_t elem     = nullptr;
+    const_lmm_element_t nextelem = nullptr;
+    int numelem                  = 0;
     while ((var = constraint()->get_variable_safe(&elem, &nextelem, &numelem))) {
       NetworkCm02Action* action = static_cast<NetworkCm02Action*>(var->get_id());
       action->weight_ += delta;
@@ -428,11 +428,11 @@ void NetworkCm02Link::setBandwidth(double value)
 
 void NetworkCm02Link::setLatency(double value)
 {
-  double delta           = value - latency_.peak;
-  lmm_variable_t var = nullptr;
-  lmm_element_t elem = nullptr;
-  lmm_element_t nextelem = nullptr;
-  int numelem = 0;
+  double delta                 = value - latency_.peak;
+  lmm_variable_t var           = nullptr;
+  const_lmm_element_t elem     = nullptr;
+  const_lmm_element_t nextelem = nullptr;
+  int numelem                  = 0;
 
   latency_.peak = value;