Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
remove bw and lat traces from the Link constructor
authorMartin Quinson <martin.quinson@loria.fr>
Tue, 8 Mar 2016 21:11:15 +0000 (22:11 +0100)
committerMartin Quinson <martin.quinson@loria.fr>
Tue, 8 Mar 2016 21:11:15 +0000 (22:11 +0100)
src/surf/network_cm02.cpp
src/surf/network_cm02.hpp
src/surf/network_constant.hpp
src/surf/network_interface.cpp
src/surf/network_interface.hpp
src/surf/network_ns3.cpp
src/surf/network_ns3.hpp
src/surf/network_smpi.hpp
src/surf/ptask_L07.cpp
src/surf/ptask_L07.hpp
src/surf/xml/surfxml_parseplatf.cpp

index a9e78ee..1ea74f3 100644 (file)
@@ -161,9 +161,7 @@ NetworkCm02Model::NetworkCm02Model()
   if (!p_maxminSystem)
     p_maxminSystem = lmm_system_new(m_selectiveUpdate);
 
   if (!p_maxminSystem)
     p_maxminSystem = lmm_system_new(m_selectiveUpdate);
 
-  routing_model_create(createLink("__loopback__",
-                                498000000, NULL, 0.000015, NULL,
-                                SURF_LINK_FATPIPE, NULL));
+  routing_model_create(createLink("__loopback__", 498000000, 0.000015, SURF_LINK_FATPIPE, NULL));
 
   if (p_updateMechanism == UM_LAZY) {
   p_actionHeap = xbt_heap_new(8, NULL);
 
   if (p_updateMechanism == UM_LAZY) {
   p_actionHeap = xbt_heap_new(8, NULL);
@@ -173,17 +171,11 @@ NetworkCm02Model::NetworkCm02Model()
   }
 }
 
   }
 }
 
-Link* NetworkCm02Model::createLink(const char *name,
-    double bw_initial, tmgr_trace_t bw_trace,
-    double lat_initial, tmgr_trace_t lat_trace,
-    e_surf_link_sharing_policy_t policy, xbt_dict_t properties)
+Link* NetworkCm02Model::createLink(const char *name, double bandwidth, double latency, e_surf_link_sharing_policy_t policy, xbt_dict_t properties)
 {
 {
-  xbt_assert(NULL == Link::byName(name),
-             "Link '%s' declared several times in the platform",
-             name);
+  xbt_assert(NULL == Link::byName(name), "Link '%s' declared several times in the platform", name);
 
 
-  Link* link = new NetworkCm02Link(this, name, properties, p_maxminSystem, sg_bandwidth_factor * bw_initial,
-      bw_initial, bw_trace, lat_initial, lat_trace, policy);
+  Link* link = new NetworkCm02Link(this, name, properties, p_maxminSystem, sg_bandwidth_factor * bandwidth, bandwidth, latency, policy);
   Link::onCreation(link);
   return link;
 }
   Link::onCreation(link);
   return link;
 }
@@ -408,22 +400,15 @@ Action *NetworkCm02Model::communicate(NetCard *src, NetCard *dst, double size, d
 NetworkCm02Link::NetworkCm02Link(NetworkCm02Model *model, const char *name, xbt_dict_t props,
     lmm_system_t system,
     double constraint_value,
 NetworkCm02Link::NetworkCm02Link(NetworkCm02Model *model, const char *name, xbt_dict_t props,
     lmm_system_t system,
     double constraint_value,
-    double bw_peak, tmgr_trace_t bw_trace,
-    double lat_initial, tmgr_trace_t lat_trace,
+    double bw_peak,  double lat_initial,
     e_surf_link_sharing_policy_t policy)
 : Link(model, name, props, lmm_constraint_new(system, this, constraint_value))
 {
   m_bandwidth.scale = 1.0;
   m_bandwidth.peak = bw_peak;
     e_surf_link_sharing_policy_t policy)
 : Link(model, name, props, lmm_constraint_new(system, this, constraint_value))
 {
   m_bandwidth.scale = 1.0;
   m_bandwidth.peak = bw_peak;
-  if (bw_trace)
-    m_bandwidth.event = future_evt_set->add_trace(bw_trace, 0.0, this);
-  else
-    m_bandwidth.event = NULL;
 
   m_latency.scale = 1.0;
   m_latency.peak = lat_initial;
 
   m_latency.scale = 1.0;
   m_latency.peak = lat_initial;
-  if (lat_trace)
-    m_latency.event = future_evt_set->add_trace(lat_trace, 0.0, this);
 
   if (policy == SURF_LINK_FATPIPE)
     lmm_constraint_shared(getConstraint());
 
   if (policy == SURF_LINK_FATPIPE)
     lmm_constraint_shared(getConstraint());
index d28defd..098563e 100644 (file)
@@ -40,10 +40,7 @@ namespace simgrid {
     public:
       NetworkCm02Model();
       ~NetworkCm02Model() { }
     public:
       NetworkCm02Model();
       ~NetworkCm02Model() { }
-      Link* createLink(const char *name,
-          double bw_initial, tmgr_trace_t bw_trace,
-          double lat_initial, tmgr_trace_t lat_trace,
-          e_surf_link_sharing_policy_t policy,
+      Link* createLink(const char *name, double bandwidth,  double latency, e_surf_link_sharing_policy_t policy,
           xbt_dict_t properties) override;
       void updateActionsStateLazy(double now, double delta) override;
       void updateActionsStateFull(double now, double delta) override;
           xbt_dict_t properties) override;
       void updateActionsStateLazy(double now, double delta) override;
       void updateActionsStateFull(double now, double delta) override;
@@ -62,9 +59,7 @@ namespace simgrid {
     public:
       NetworkCm02Link(NetworkCm02Model *model, const char *name, xbt_dict_t props,
           lmm_system_t system,
     public:
       NetworkCm02Link(NetworkCm02Model *model, const char *name, xbt_dict_t props,
           lmm_system_t system,
-          double constraint_value,
-          double bw_peak, tmgr_trace_t bw_trace,
-          double lat_initial, tmgr_trace_t lat_trace,
+          double constraint_value, double bw_peak, double lat_initial,
           e_surf_link_sharing_policy_t policy);
 
       void apply_event(tmgr_trace_iterator_t event, double value) override;
           e_surf_link_sharing_policy_t policy);
 
       void apply_event(tmgr_trace_iterator_t event, double value) override;
index c3c23f0..9848e7a 100644 (file)
@@ -34,12 +34,8 @@ namespace simgrid {
       bool next_occuring_event_isIdempotent() override {return true;}
       void updateActionsState(double now, double delta) override;
 
       bool next_occuring_event_isIdempotent() override {return true;}
       void updateActionsState(double now, double delta) override;
 
-      Link*
-      createLink(const char *name,
-          double bw_initial, tmgr_trace_t bw_trace,
-          double lat_initial, tmgr_trace_t lat_trace,
-          e_surf_link_sharing_policy_t policy,
-          xbt_dict_t properties)          override { DIE_IMPOSSIBLE; }
+      Link* createLink(const char *name, double bw, double lat, e_surf_link_sharing_policy_t policy, xbt_dict_t properties) override
+        { DIE_IMPOSSIBLE; }
     };
 
     /**********
     };
 
     /**********
index ed0dd21..3c2bb7e 100644 (file)
@@ -109,33 +109,33 @@ void netlink_parse_init(sg_platf_link_cbarg_t link){
   if (link->policy == SURF_LINK_FULLDUPLEX) {
     char *link_id;
     link_id = bprintf("%s_UP", link->id);
   if (link->policy == SURF_LINK_FULLDUPLEX) {
     char *link_id;
     link_id = bprintf("%s_UP", link->id);
-    Link *l = surf_network_model->createLink(link_id,
-        link->bandwidth,
-        link->bandwidth_trace,
-        link->latency,
-        link->latency_trace,
+    Link *l = surf_network_model->createLink(link_id, link->bandwidth, link->latency,
         link->policy, link->properties);
         link->policy, link->properties);
+    if (link->latency_trace)
+      l->setLatencyTrace(link->latency_trace);
+    if (link->bandwidth_trace)
+      l->setBandwidthTrace(link->bandwidth_trace);
     if (link->state_trace)
       l->setStateTrace(link->state_trace);
 
     xbt_free(link_id);
     link_id = bprintf("%s_DOWN", link->id);
     if (link->state_trace)
       l->setStateTrace(link->state_trace);
 
     xbt_free(link_id);
     link_id = bprintf("%s_DOWN", link->id);
-    l = surf_network_model->createLink(link_id,
-        link->bandwidth,
-        link->bandwidth_trace,
-        link->latency,
-        link->latency_trace,
+    l = surf_network_model->createLink(link_id, link->bandwidth, link->latency,
         link->policy, link->properties);
         link->policy, link->properties);
+    if (link->latency_trace)
+      l->setLatencyTrace(link->latency_trace);
+    if (link->bandwidth_trace)
+      l->setBandwidthTrace(link->bandwidth_trace);
     if (link->state_trace)
       l->setStateTrace(link->state_trace);
     xbt_free(link_id);
   } else {
     if (link->state_trace)
       l->setStateTrace(link->state_trace);
     xbt_free(link_id);
   } else {
-    Link *l=surf_network_model->createLink(link->id,
-        link->bandwidth,
-        link->bandwidth_trace,
-        link->latency,
-        link->latency_trace,
+    Link *l=surf_network_model->createLink(link->id, link->bandwidth, link->latency,
         link->policy, link->properties);
         link->policy, link->properties);
+    if (link->latency_trace)
+      l->setLatencyTrace(link->latency_trace);
+    if (link->bandwidth_trace)
+      l->setBandwidthTrace(link->bandwidth_trace);
     if (link->state_trace)
       l->setStateTrace(link->state_trace);
   }
     if (link->state_trace)
       l->setStateTrace(link->state_trace);
   }
@@ -209,11 +209,6 @@ namespace simgrid {
       XBT_DEBUG("Create link '%s'",name);
 
     }
       XBT_DEBUG("Create link '%s'",name);
 
     }
-    void Link::setStateTrace(tmgr_trace_t trace) {
-      if (m_stateEvent != nullptr)
-        XBT_INFO("Changing the state trace is not well tested. You're on your own.");
-      m_stateEvent = future_evt_set->add_trace(trace, 0.0, this);
-    }
 
     /** @brief use destroy() instead of this destructor */
     Link::~Link() {
 
     /** @brief use destroy() instead of this destructor */
     Link::~Link() {
@@ -264,22 +259,18 @@ namespace simgrid {
         onStateChange(this);
       }
     }
         onStateChange(this);
       }
     }
-    void Link::set_state_trace(tmgr_trace_t trace)
-    {
+    void Link::setStateTrace(tmgr_trace_t trace) {
       xbt_assert(m_stateEvent==NULL,"Cannot set a second state trace to Link %s", getName());
       xbt_assert(m_stateEvent==NULL,"Cannot set a second state trace to Link %s", getName());
-
       m_stateEvent = future_evt_set->add_trace(trace, 0.0, this);
     }
       m_stateEvent = future_evt_set->add_trace(trace, 0.0, this);
     }
-    void Link::set_bandwidth_trace(tmgr_trace_t trace)
+    void Link::setBandwidthTrace(tmgr_trace_t trace)
     {
       xbt_assert(m_bandwidth.event==NULL,"Cannot set a second bandwidth trace to Link %s", getName());
     {
       xbt_assert(m_bandwidth.event==NULL,"Cannot set a second bandwidth trace to Link %s", getName());
-
       m_bandwidth.event = future_evt_set->add_trace(trace, 0.0, this);
     }
       m_bandwidth.event = future_evt_set->add_trace(trace, 0.0, this);
     }
-    void Link::set_latency_trace(tmgr_trace_t trace)
+    void Link::setLatencyTrace(tmgr_trace_t trace)
     {
       xbt_assert(m_latency.event==NULL,"Cannot set a second latency trace to Link %s", getName());
     {
       xbt_assert(m_latency.event==NULL,"Cannot set a second latency trace to Link %s", getName());
-
       m_latency.event = future_evt_set->add_trace(trace, 0.0, this);
     }
 
       m_latency.event = future_evt_set->add_trace(trace, 0.0, this);
     }
 
index 7bacd5a..cb59af1 100644 (file)
@@ -80,21 +80,14 @@ namespace simgrid {
        * @brief Create a Link
        *
        * @param name The name of the Link
        * @brief Create a Link
        *
        * @param name The name of the Link
-       * @param bw_initial The initial bandwidth of the Link in bytes per second
-       * @param bw_trace The trace associated to the Link bandwidth
-       * @param lat_initial The initial latency of the Link in seconds
-       * @param lat_trace The trace associated to the Link latency
+       * @param bandwidth The initial bandwidth of the Link in bytes per second
+       * @param latency The initial latency of the Link in seconds
        * @param policy The sharing policy of the Link
        * @param properties Dictionary of properties associated to this Resource
        * @return The created Link
        */
        * @param policy The sharing policy of the Link
        * @param properties Dictionary of properties associated to this Resource
        * @return The created Link
        */
-      virtual Link* createLink(const char *name,
-          double bw_initial,
-          tmgr_trace_t bw_trace,
-          double lat_initial,
-          tmgr_trace_t lat_trace,
-          e_surf_link_sharing_policy_t policy,
-          xbt_dict_t properties)=0;
+      virtual Link* createLink(const char *name, double bandwidth, double latency,
+          e_surf_link_sharing_policy_t policy, xbt_dict_t properties)=0;
 
       /**
        * @brief Create a communication between two hosts.
 
       /**
        * @brief Create a communication between two hosts.
@@ -184,9 +177,6 @@ namespace simgrid {
        */
       Link(simgrid::surf::NetworkModel *model, const char *name, xbt_dict_t props, lmm_constraint_t constraint);
 
        */
       Link(simgrid::surf::NetworkModel *model, const char *name, xbt_dict_t props, lmm_constraint_t constraint);
 
-      /** @brief State traces are used to model the on/off state of the link */
-      void setStateTrace(tmgr_trace_t trace);
-
       /* Link destruction logic */
       /**************************/
         protected:
       /* Link destruction logic */
       /**************************/
         protected:
@@ -231,9 +221,9 @@ namespace simgrid {
       void turnOn() override;
       void turnOff() override;
 
       void turnOn() override;
       void turnOff() override;
 
-      virtual void set_state_trace(tmgr_trace_t trace); /*< setup the trace file with states events (ON or OFF). Trace must contain boolean values. */
-      virtual void set_bandwidth_trace(tmgr_trace_t trace); /*< setup the trace file with bandwidth events (peak speed changes due to external load). Trace must contain percentages (value between 0 and 1). */
-      virtual void set_latency_trace(tmgr_trace_t trace); /*< setup the trace file with latency events (peak latency changes due to external load). Trace must contain absolute values */
+      virtual void setStateTrace(tmgr_trace_t trace); /*< setup the trace file with states events (ON or OFF). Trace must contain boolean values. */
+      virtual void setBandwidthTrace(tmgr_trace_t trace); /*< setup the trace file with bandwidth events (peak speed changes due to external load). Trace must contain percentages (value between 0 and 1). */
+      virtual void setLatencyTrace(tmgr_trace_t trace); /*< setup the trace file with latency events (peak latency changes due to external load). Trace must contain absolute values */
 
       tmgr_trace_iterator_t m_stateEvent = NULL;
       s_surf_metric_t m_latency = {1.0,0,NULL};
 
       tmgr_trace_iterator_t m_stateEvent = NULL;
       s_surf_metric_t m_latency = {1.0,0,NULL};
index 2072922..7a64e73 100644 (file)
@@ -40,14 +40,15 @@ static void parse_ns3_add_link(sg_platf_link_cbarg_t link)
   if(!IPV4addr)
     IPV4addr = xbt_dynar_new(sizeof(char*),free);
 
   if(!IPV4addr)
     IPV4addr = xbt_dynar_new(sizeof(char*),free);
 
-  Link *l = surf_network_model->createLink(link->id,
-      link->bandwidth, link->bandwidth_trace,
-      link->latency, link->latency_trace,
+  Link *l = surf_network_model->createLink(link->id, link->bandwidth, link->latency,
       link->policy, link->properties);
       link->policy, link->properties);
+  if (link->bandwidth_trace)
+    l->setBandwidthTrace(link->latency_trace);
+  if (link->latency_trace)
+    l->setLatencyTrace(link->latency_trace);
   if (link->state_trace)
     l->setStateTrace(link->state_trace);
 }
   if (link->state_trace)
     l->setStateTrace(link->state_trace);
 }
-
 static void simgrid_ns3_add_router(simgrid::surf::NetCard* router)
 {
   const char* router_id = router->name();
 static void simgrid_ns3_add_router(simgrid::surf::NetCard* router)
 {
   const char* router_id = router->name();
@@ -260,17 +261,10 @@ NetworkNS3Model::~NetworkNS3Model() {
   xbt_dict_free(&dict_socket);
 }
 
   xbt_dict_free(&dict_socket);
 }
 
-Link* NetworkNS3Model::createLink(const char *name,
-    double bw_initial, tmgr_trace_t bw_trace,
-    double lat_initial, tmgr_trace_t lat_trace,
-    e_surf_link_sharing_policy_t policy,
+Link* NetworkNS3Model::createLink(const char *name, double bandwidth, double latency, e_surf_link_sharing_policy_t policy,
     xbt_dict_t properties){
     xbt_dict_t properties){
-  if (bw_trace)
-    XBT_INFO("The NS3 network model doesn't support bandwidth state traces");
-  if (lat_trace)
-    XBT_INFO("The NS3 network model doesn't support latency state traces");
 
 
-  Link* link = new NetworkNS3Link(this, name, properties, bw_initial, lat_initial);
+  Link* link = new NetworkNS3Link(this, name, properties, bandwidth, latency);
   Link::onCreation(link);
   return link;
 }
   Link::onCreation(link);
   return link;
 }
@@ -390,6 +384,12 @@ void NetworkNS3Link::apply_event(tmgr_trace_iterator_t event, double value)
 {
   THROW_UNIMPLEMENTED;
 }
 {
   THROW_UNIMPLEMENTED;
 }
+void NetworkNS3Link::setBandwidthTrace(tmgr_trace_t trace) {
+  xbt_die("The NS3 network model doesn't support latency state traces");
+}
+void NetworkNS3Link::setLatencyTrace(tmgr_trace_t trace) {
+  xbt_die("The NS3 network model doesn't support latency state traces");
+}
 
 /**********
  * Action *
 
 /**********
  * Action *
index 96b091e..adfca7c 100644 (file)
@@ -41,13 +41,9 @@ namespace surf {
 class NetworkNS3Model : public NetworkModel {
 public:
   NetworkNS3Model();
 class NetworkNS3Model : public NetworkModel {
 public:
   NetworkNS3Model();
-
   ~NetworkNS3Model();
   ~NetworkNS3Model();
-  Link* createLink(const char *name,
-      double bw_initial, tmgr_trace_t bw_trace,
-      double lat_initial, tmgr_trace_t lat_trace,
-      e_surf_link_sharing_policy_t policy,
-      xbt_dict_t properties) override;
+  Link* createLink(const char *name, double bandwidth, double latency,
+      e_surf_link_sharing_policy_t policy, xbt_dict_t properties) override;
   Action *communicate(NetCard *src, NetCard *dst, double size, double rate);
   double next_occuring_event(double now) override;
   bool next_occuring_event_isIdempotent() {return false;}
   Action *communicate(NetCard *src, NetCard *dst, double size, double rate);
   double next_occuring_event(double now) override;
   bool next_occuring_event_isIdempotent() {return false;}
@@ -59,13 +55,14 @@ public:
  ************/
 class NetworkNS3Link : public Link {
 public:
  ************/
 class NetworkNS3Link : public Link {
 public:
-  NetworkNS3Link(NetworkNS3Model *model, const char *name, xbt_dict_t props,
-               double bw_initial, double lat_initial);
+  NetworkNS3Link(NetworkNS3Model *model, const char *name, xbt_dict_t props, double bandwidth, double latency);
   ~NetworkNS3Link();
 
   void apply_event(tmgr_trace_iterator_t event, double value) override;
   void updateBandwidth(double value) override {THROW_UNIMPLEMENTED;}
   void updateLatency(double value) override {THROW_UNIMPLEMENTED;}
   ~NetworkNS3Link();
 
   void apply_event(tmgr_trace_iterator_t event, double value) override;
   void updateBandwidth(double value) override {THROW_UNIMPLEMENTED;}
   void updateLatency(double value) override {THROW_UNIMPLEMENTED;}
+  void setBandwidthTrace(tmgr_trace_t trace) override;
+  void setLatencyTrace(tmgr_trace_t trace) override;
 
 //private:
  int m_created;
 
 //private:
  int m_created;
index c369fdb..ce6105d 100644 (file)
@@ -24,16 +24,5 @@ namespace simgrid {
       double bandwidthConstraint(double rate, double bound, double size);
       void communicateCallBack() {};
     };
       double bandwidthConstraint(double rate, double bound, double size);
       void communicateCallBack() {};
     };
-
-
-    /************
-     * Resource *
-     ************/
-
-
-    /**********
-     * Action *
-     **********/
-
   }
 }
   }
 }
index 2179b17..1b5534d 100644 (file)
@@ -49,10 +49,7 @@ HostL07Model::HostL07Model() : HostModel() {
   surf_network_model = new NetworkL07Model(this,p_maxminSystem);
   surf_cpu_model_pm = new CpuL07Model(this,p_maxminSystem);
 
   surf_network_model = new NetworkL07Model(this,p_maxminSystem);
   surf_cpu_model_pm = new CpuL07Model(this,p_maxminSystem);
 
-  routing_model_create(surf_network_model->createLink("__loopback__",
-                                                    498000000, NULL,
-                                                    0.000015, NULL,
-                                                    SURF_LINK_FATPIPE, NULL));
+  routing_model_create(surf_network_model->createLink("__loopback__", 498000000, 0.000015, SURF_LINK_FATPIPE, NULL));
 }
 
 HostL07Model::~HostL07Model() {
 }
 
 HostL07Model::~HostL07Model() {
@@ -292,15 +289,13 @@ Cpu *CpuL07Model::createCpu(simgrid::s4u::Host *host,  xbt_dynar_t powerPeakList
   return cpu;
 }
 
   return cpu;
 }
 
-Link* NetworkL07Model::createLink(const char *name,
-    double bw_initial, tmgr_trace_t bw_trace,
-    double lat_initial, tmgr_trace_t lat_trace,
+Link* NetworkL07Model::createLink(const char *name, double bandwidth, double latency,
     e_surf_link_sharing_policy_t policy, xbt_dict_t properties)
 {
   xbt_assert(!Link::byName(name),
            "Link '%s' declared several times in the platform.", name);
 
     e_surf_link_sharing_policy_t policy, xbt_dict_t properties)
 {
   xbt_assert(!Link::byName(name),
            "Link '%s' declared several times in the platform.", name);
 
-  Link* link = new LinkL07(this, name, properties, bw_initial, bw_trace, lat_initial, lat_trace, policy);
+  Link* link = new LinkL07(this, name, properties, bandwidth, latency, policy);
   Link::onCreation(link);
   return link;
 }
   Link::onCreation(link);
   return link;
 }
@@ -328,19 +323,12 @@ CpuL07::~CpuL07()
 {
 }
 
 {
 }
 
-LinkL07::LinkL07(NetworkL07Model *model, const char* name, xbt_dict_t props,
-             double bw_initial, tmgr_trace_t bw_trace,
-             double lat_initial, tmgr_trace_t lat_trace,
+LinkL07::LinkL07(NetworkL07Model *model, const char* name, xbt_dict_t props, double bandwidth, double latency,
              e_surf_link_sharing_policy_t policy)
              e_surf_link_sharing_policy_t policy)
- : Link(model, name, props, lmm_constraint_new(model->getMaxminSystem(), this, bw_initial))
+ : Link(model, name, props, lmm_constraint_new(model->getMaxminSystem(), this, bandwidth))
 {
 {
-  m_bandwidth.peak = bw_initial;
-  if (bw_trace)
-    m_bandwidth.event = future_evt_set->add_trace(bw_trace, 0.0, this);
-
-  m_latency.peak = lat_initial;
-  if (lat_trace)
-    m_latency.event = future_evt_set->add_trace(lat_trace, 0.0, this);
+  m_bandwidth.peak = bandwidth;
+  m_latency.peak = latency;
 
   if (policy == SURF_LINK_FATPIPE)
     lmm_constraint_shared(getConstraint());
 
   if (policy == SURF_LINK_FATPIPE)
     lmm_constraint_shared(getConstraint());
index c9faa75..9315cd1 100644 (file)
@@ -64,11 +64,7 @@ class NetworkL07Model : public NetworkModel {
 public:
   NetworkL07Model(HostL07Model *hmodel, lmm_system_t sys);
   ~NetworkL07Model();
 public:
   NetworkL07Model(HostL07Model *hmodel, lmm_system_t sys);
   ~NetworkL07Model();
-  Link* createLink(const char *name,
-      double bw_initial,
-      tmgr_trace_t bw_trace,
-      double lat_initial,
-      tmgr_trace_t lat_trace,
+  Link* createLink(const char *name, double bandwidth, double latency,
       e_surf_link_sharing_policy_t policy,
       xbt_dict_t properties) override;
 
       e_surf_link_sharing_policy_t policy,
       xbt_dict_t properties) override;
 
@@ -98,9 +94,7 @@ protected:
 class LinkL07 : public Link {
 public:
   LinkL07(NetworkL07Model *model, const char* name, xbt_dict_t props,
 class LinkL07 : public Link {
 public:
   LinkL07(NetworkL07Model *model, const char* name, xbt_dict_t props,
-      double bw_initial, tmgr_trace_t bw_trace,
-      double lat_initial, tmgr_trace_t lat_trace,
-      e_surf_link_sharing_policy_t policy);
+      double bandwidth, double latency, e_surf_link_sharing_policy_t policy);
   ~LinkL07(){ };
   bool isUsed() override;
   void apply_event(tmgr_trace_iterator_t event, double value) override;
   ~LinkL07(){ };
   bool isUsed() override;
   void apply_event(tmgr_trace_iterator_t event, double value) override;
index 02f8ccd..d87f73c 100644 (file)
@@ -207,7 +207,7 @@ void parse_platform_file(const char *file)
       xbt_assert(trace, "Trace %s undefined", trace_name);
       Link *link = Link::byName(elm);
       xbt_assert(link, "Link %s undefined", elm);
       xbt_assert(trace, "Trace %s undefined", trace_name);
       Link *link = Link::byName(elm);
       xbt_assert(link, "Link %s undefined", elm);
-      link->set_state_trace(trace);
+      link->setStateTrace(trace);
     }
 
     xbt_dict_foreach(trace_connect_list_link_bw, cursor, trace_name, elm) {
     }
 
     xbt_dict_foreach(trace_connect_list_link_bw, cursor, trace_name, elm) {
@@ -215,7 +215,7 @@ void parse_platform_file(const char *file)
       xbt_assert(trace, "Trace %s undefined", trace_name);
       Link *link = Link::byName(elm);
       xbt_assert(link, "Link %s undefined", elm);
       xbt_assert(trace, "Trace %s undefined", trace_name);
       Link *link = Link::byName(elm);
       xbt_assert(link, "Link %s undefined", elm);
-      link->set_bandwidth_trace(trace);
+      link->setBandwidthTrace(trace);
     }
 
     xbt_dict_foreach(trace_connect_list_link_lat, cursor, trace_name, elm) {
     }
 
     xbt_dict_foreach(trace_connect_list_link_lat, cursor, trace_name, elm) {
@@ -223,7 +223,7 @@ void parse_platform_file(const char *file)
       xbt_assert(trace, "Trace %s undefined", trace_name);
       Link *link = Link::byName(elm);
       xbt_assert(link, "Link %s undefined", elm);
       xbt_assert(trace, "Trace %s undefined", trace_name);
       Link *link = Link::byName(elm);
       xbt_assert(link, "Link %s undefined", elm);
-      link->set_latency_trace(trace);
+      link->setLatencyTrace(trace);
     }
 
     /* Free my data */
     }
 
     /* Free my data */