Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Update copyright lines for 2023.
[simgrid.git] / src / kernel / resource / NetworkModel.cpp
index dd3da13..8a04dc4 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2013-2022. The SimGrid Team. All rights reserved.          */
+/* Copyright (c) 2013-2023. The SimGrid Team. All rights reserved.          */
 
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
@@ -6,15 +6,13 @@
 #include <simgrid/s4u/Engine.hpp>
 
 #include "simgrid/sg_config.hpp"
+#include "src/kernel/resource/FactorSet.hpp"
 #include "src/kernel/resource/NetworkModel.hpp"
 #include "src/kernel/resource/profile/Profile.hpp"
 #include "src/surf/surf_interface.hpp"
 
 #include <numeric>
 
-#ifndef NETWORK_INTERFACE_CPP_
-#define NETWORK_INTERFACE_CPP_
-
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(res_network, ker_resource, "Network resources, that fuel communications");
 
 /*********
@@ -22,8 +20,6 @@ XBT_LOG_NEW_DEFAULT_SUBCATEGORY(res_network, ker_resource, "Network resources, t
  *********/
 
 namespace simgrid::kernel::resource {
-double NetworkModel::cfg_latency_factor   = 1.0; // default value
-double NetworkModel::cfg_bandwidth_factor = 1.0; // default value
 
 /** @brief Command-line option 'network/TCP-gamma' -- see @ref options_model_network_gamma */
 config::Flag<double> NetworkModel::cfg_tcp_gamma(
@@ -37,6 +33,10 @@ config::Flag<bool> NetworkModel::cfg_crosstraffic(
     "network/crosstraffic",
     "Activate the interferences between uploads and downloads for fluid max-min models (LV08, CM02)", "yes");
 
+config::Flag<double> NetworkModel::cfg_weight_S_parameter(
+    "network/weight-S",
+    "Correction factor to apply to the weight of competing streams (default value set by network model)", 0.0);
+
 NetworkModel::~NetworkModel() = default;
 
 double NetworkModel::next_occurring_event_full(double now)
@@ -111,5 +111,3 @@ void insert_link_latency(std::vector<StandardLinkImpl*>& result, const std::vect
 }
 
 } // namespace simgrid::kernel::resource
-
-#endif /* NETWORK_INTERFACE_CPP_ */