Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Add tests before changes to WakeupTree structure
[simgrid.git] / src / plugins / link_energy.cpp
index 116d5aea41e7057191a0b3e3fc6b0a9eec00cb9e..4cf3a5e1ae161e638275829004506b2e4d38642b 100644 (file)
@@ -9,7 +9,7 @@
 #include "simgrid/s4u/Engine.hpp"
 #include "simgrid/s4u/Link.hpp"
 #include "src/kernel/activity/CommImpl.hpp"
-#include "src/surf/surf_interface.hpp"
+#include "src/simgrid/module.hpp"
 
 #include <boost/algorithm/string/classification.hpp>
 #include <boost/algorithm/string/split.hpp>
@@ -128,7 +128,7 @@ double LinkEnergy::get_power() const
 
   double power_slope = busy_ - idle_;
 
-  double normalized_link_usage = link_->get_usage() / link_->get_bandwidth();
+  double normalized_link_usage = link_->get_load() / link_->get_bandwidth();
   double dynamic_power         = power_slope * normalized_link_usage;
 
   return idle_ + dynamic_power;