]> AND Public Git Repository - simgrid.git/blobdiff - src/surf/network_interface.cpp
Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Simplify a bit Keyval::attr_delete.
[simgrid.git] / src / surf / network_interface.cpp
index 2cb1cdfb4da17d1dddbc1694ae148cfa204929fc..69e392a121139eff08bd45a5f0e6754466700955 100644 (file)
@@ -52,6 +52,11 @@ double NetworkModel::next_occurring_event_full(double now)
   return minRes;
 }
 
+double NetworkModel::get_bandwidth_constraint(double rate, double bound, double /* size */) const
+{
+  return rate < 0 ? bound : std::min(bound, rate);
+}
+
 /************
  * Resource *
  ************/