Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
stick to our coding standards: getters should have get_ in their name
[simgrid.git] / src / surf / network_cm02.cpp
index 94a7a5a..28b678e 100644 (file)
@@ -87,7 +87,9 @@ NetworkCm02Model::NetworkCm02Model(kernel::lmm::System* (*make_new_lmm_system)(b
   }
 
   set_maxmin_system(make_new_lmm_system(select));
-  loopback_ = NetworkCm02Model::create_link("__loopback__", std::vector<double>(1, 498000000), 0.000015,
+  loopback_ = NetworkCm02Model::create_link("__loopback__", 
+                                            std::vector<double>{simgrid::config::get_value<double>("network/loopback-bw")},
+                                            simgrid::config::get_value<double>("network/loopback-lat"),
                                             s4u::Link::SharingPolicy::FATPIPE);
 }
 
@@ -189,7 +191,7 @@ Action* NetworkCm02Model::communicate(s4u::Host* src, s4u::Host* dst, double siz
   action->latency_ = latency;
   action->rate_ = rate;
 
-  if (get_update_algorithm() == Model::UpdateAlgo::LAZY) {
+  if (is_update_lazy()) {
     action->set_last_update();
   }
 
@@ -214,7 +216,7 @@ Action* NetworkCm02Model::communicate(s4u::Host* src, s4u::Host* dst, double siz
 
   if (action->latency_ > 0) {
     action->set_variable(get_maxmin_system()->variable_new(action, 0.0, -1.0, constraints_per_variable));
-    if (get_update_algorithm() == Model::UpdateAlgo::LAZY) {
+    if (is_update_lazy()) {
       // add to the heap the event when the latency is payed
       double date = action->latency_ + action->get_last_update();