Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Fix a doc error about actors (Tutorial_algorithms)
[simgrid.git] / src / surf / ptask_L07.cpp
index 18cba8c..85c2bc3 100644 (file)
@@ -57,7 +57,8 @@ NetworkL07Model::NetworkL07Model(HostL07Model* hmodel, kernel::lmm::System* sys)
     : NetworkModel(Model::UpdateAlgo::FULL), hostModel_(hmodel)
 {
   set_maxmin_system(sys);
-  loopback_ = NetworkL07Model::create_link("__loopback__", 498000000, 0.000015, s4u::Link::SharingPolicy::FATPIPE);
+  loopback_ = NetworkL07Model::create_link("__loopback__", std::vector<double>{498000000}, 0.000015,
+                                           s4u::Link::SharingPolicy::FATPIPE);
 }
 
 NetworkL07Model::~NetworkL07Model()
@@ -224,10 +225,11 @@ kernel::resource::Cpu* CpuL07Model::create_cpu(s4u::Host* host, const std::vecto
   return new CpuL07(this, host, speed_per_pstate, core);
 }
 
-kernel::resource::LinkImpl* NetworkL07Model::create_link(const std::string& name, double bandwidth, double latency,
-                                                         s4u::Link::SharingPolicy policy)
+kernel::resource::LinkImpl* NetworkL07Model::create_link(const std::string& name, const std::vector<double>& bandwidths,
+                                                         double latency, s4u::Link::SharingPolicy policy)
 {
-  return new LinkL07(this, name, bandwidth, latency, policy);
+  xbt_assert(bandwidths.size() == 1, "Non WIFI link must have only 1 bandwidth.");
+  return new LinkL07(this, name, bandwidths[0], latency, policy);
 }
 
 /************