Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
make Model::update_algo a constant field, set at initialization only
[simgrid.git] / src / surf / network_interface.hpp
index e1e88ee..a04496e 100644 (file)
@@ -34,7 +34,7 @@ namespace surf {
 class NetworkModel : public kernel::resource::Model {
 public:
   /** @brief Constructor */
-  NetworkModel() : Model() {}
+  explicit NetworkModel(kernel::resource::Model::UpdateAlgo algo) : Model(algo) {}
 
   /** @brief Destructor */
   ~NetworkModel() override;
@@ -64,12 +64,6 @@ public:
    */
   virtual kernel::resource::Action* communicate(s4u::Host* src, s4u::Host* dst, double size, double rate) = 0;
 
-  /** @brief Function pointer to the function to use to solve the lmm_system_t
-   *
-   * @param system The lmm_system_t to solve
-   */
-  void (*f_networkSolve)(kernel::lmm::System*) = kernel::lmm::lmm_solve;
-
   /**
    * @brief Get the right multiplicative factor for the latency.
    * @details Depending on the model, the effective latency when sending
@@ -104,7 +98,7 @@ public:
    * @return The new bandwidth.
    */
   virtual double bandwidthConstraint(double rate, double bound, double size);
-  double nextOccuringEventFull(double now) override;
+  double next_occuring_event_full(double now) override;
 
   LinkImpl* loopback_ = nullptr;
 };
@@ -147,7 +141,7 @@ public:
   virtual int sharingPolicy();
 
   /** @brief Check if the Link is used */
-  bool isUsed() override;
+  bool is_used() override;
 
   void turnOn() override;
   void turnOff() override;
@@ -213,7 +207,7 @@ public:
   NetworkAction(simgrid::kernel::resource::Model* model, double cost, bool failed, kernel::lmm::Variable* var)
       : simgrid::kernel::resource::Action(model, cost, failed, var){};
 
-  void setState(simgrid::kernel::resource::Action::State state) override;
+  void set_state(simgrid::kernel::resource::Action::State state) override;
   virtual std::list<LinkImpl*> links();
 
   double latency_    = {};