+ for (i = 0; i < nb_links; i++) {
+ bandwidth = SD_link_get_current_bandwidth(links[i]);
+ if (bandwidth < min_bandwidth || min_bandwidth == -1.0)
+ min_bandwidth = bandwidth;
+ }
+
+ free(links);
+ return min_bandwidth;
+}
+
+/**
+ * \brief Returns an approximative estimated time for the given
+ * communication amount between two workstations
+ *
+ * \param src the first workstation
+ * \param dst the second workstation
+ * \param communication_amount the communication amount you want to evaluate (in bytes)
+ * \return an approximative astimated computation time for the given communication amount
+ * between the workstations (in seconds)
+ */
+double SD_route_get_communication_time(SD_workstation_t src, SD_workstation_t dst,
+ double communication_amount) {
+ /* total time = latency + transmission time of the slowest link
+ transmission time of a link = communication amount / link bandwidth */
+ SD_CHECK_INIT_DONE();
+ xbt_assert0(src != NULL && dst != NULL, "Invalid parameter");
+ xbt_assert0(communication_amount >= 0, "communication_amount must be greater than or equal to zero");