#include "src/kernel/resource/models/network_cm02.hpp"
#include "simgrid/kernel/routing/NetZoneImpl.hpp"
-#include "simgrid/math_utils.h"
#include "simgrid/s4u/Engine.hpp"
#include "simgrid/s4u/Host.hpp"
-#include "simgrid/sg_config.hpp"
#include "src/kernel/EngineImpl.hpp"
#include "src/kernel/resource/StandardLinkImpl.hpp"
#include "src/kernel/resource/WifiLinkImpl.hpp"
#include "src/kernel/resource/profile/Event.hpp"
+#include "src/simgrid/math_utils.h"
#include "src/simgrid/module.hpp"
+#include "src/simgrid/sg_config.hpp"
#include <algorithm>
#include <numeric>
StandardLinkImpl* NetworkCm02Model::create_link(const std::string& name, const std::vector<double>& bandwidths)
{
xbt_assert(bandwidths.size() == 1, "Non-WIFI links must use only 1 bandwidth.");
- auto link = new NetworkCm02Link(name, bandwidths[0], get_maxmin_system());
+ auto* link = new NetworkCm02Link(name, bandwidths[0], get_maxmin_system());
link->set_model(this);
return link;
}
StandardLinkImpl* NetworkCm02Model::create_wifi_link(const std::string& name, const std::vector<double>& bandwidths)
{
- auto link = new WifiLinkImpl(name, bandwidths, get_maxmin_system());
+ auto* link = new WifiLinkImpl(name, bandwidths, get_maxmin_system());
link->set_model(this);
return link;
}
if (cfg_weight_S_parameter > 0) {
action->sharing_penalty_ = std::accumulate(route.begin(), route.end(), action->sharing_penalty_,
- [](double total, StandardLinkImpl* const& link) {
+ [](double total, StandardLinkImpl const* link) {
return total + cfg_weight_S_parameter / link->get_bandwidth();
});
}