*/
virtual double get_bandwidth_factor(double /* size*/) { return sg_bandwidth_factor; }
- /**
- * @brief Get definitive bandwidth.
- * @details It gives the minimum bandwidth between the one that would occur if no limitation was enforced, and the
- * one arbitrary limited.
- * @param rate The desired maximum bandwidth.
- * @param bound The bandwidth with only the network taken into account.
- * @param size The size of the message.
- * @return The new bandwidth.
- */
- virtual double get_bandwidth_constraint(double rate, double /*bound*/, double /*size*/) { return rate; }
-
double next_occurring_event_full(double now) override;
- virtual void set_lat_factor_cb(const std::function<NetworkFactorCb>& cb) override { THROW_UNIMPLEMENTED; }
- virtual void set_bw_factor_cb(const std::function<NetworkFactorCb>& cb) override { THROW_UNIMPLEMENTED; }
+ void set_lat_factor_cb(const std::function<NetworkFactorCb>& cb) override { THROW_UNIMPLEMENTED; }
+ void set_bw_factor_cb(const std::function<NetworkFactorCb>& cb) override { THROW_UNIMPLEMENTED; }
LinkImpl* loopback_ = nullptr;
};
* Profile must contain absolute values */
virtual LinkImpl* set_latency_profile(kernel::profile::Profile* profile);
+ void set_concurrency_limit(int limit);
+
Metric latency_ = {0.0, 1, nullptr};
Metric bandwidth_ = {1.0, 1, nullptr};
};
s4u::Host& get_src() const { return src_; }
s4u::Host& get_dst() const { return dst_; }
};
+
+/* Insert link(s) at the end of vector `result' (at the beginning, and reversed, for insert_link_latency()), and add
+ * link->get_latency() to *latency when latency is not null
+ */
+void add_link_latency(std::vector<LinkImpl*>& result, LinkImpl* link, double* latency);
+void add_link_latency(std::vector<LinkImpl*>& result, const std::vector<LinkImpl*>& links, double* latency);
+void insert_link_latency(std::vector<LinkImpl*>& result, const std::vector<LinkImpl*>& links, double* latency);
+
} // namespace resource
} // namespace kernel
} // namespace simgrid