Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
little doc reorg: split a page in two
[simgrid.git] / src / surf / network_interface.cpp
index 00ea637..9100fea 100644 (file)
@@ -61,7 +61,7 @@ extern "C" {
 namespace simgrid {
   namespace surf {
 
-    boost::unordered_map<std::string,Link *> *Link::links = new boost::unordered_map<std::string,Link *>();
+    std::unordered_map<std::string,Link *> *Link::links = new std::unordered_map<std::string,Link *>();
     Link *Link::byName(const char* name) {
       if (links->find(name) == links->end())
         return nullptr;
@@ -129,20 +129,14 @@ namespace simgrid {
       return rate;
     }
 
-    double NetworkModel::next_occuring_event_full(double now)
+    double NetworkModel::nextOccuringEventFull(double now)
     {
-      NetworkAction *action = nullptr;
-      ActionList *runningActions = surf_network_model->getRunningActionSet();
-      double minRes;
+      double minRes = Model::nextOccuringEventFull(now);
 
-      minRes = shareResourcesMaxMin(runningActions, surf_network_model->maxminSystem_, surf_network_model->f_networkSolve);
-
-      for(ActionList::iterator it(runningActions->begin()), itend(runningActions->end())
-          ; it != itend ; ++it) {
-        action = static_cast<NetworkAction*>(&*it);
-        if (action->latency_ > 0) {
+      for(auto it(getRunningActionSet()->begin()), itend(getRunningActionSet()->end()); it != itend ; it++) {
+        NetworkAction *action = static_cast<NetworkAction*>(&*it);
+        if (action->latency_ > 0)
           minRes = (minRes < 0) ? action->latency_ : std::min(minRes, action->latency_);
-        }
       }
 
       XBT_DEBUG("Min of share resources %f", minRes);