-
- const SD_link_t *links;
- int nb_links;
- double bandwidth;
- double min_bandwidth;
- int i;
-
- links = SD_route_get_list(src, dst);
- nb_links = SD_route_get_size(src, dst);
- min_bandwidth = -1.0;
-
- for (i = 0; i < nb_links; i++) {
- bandwidth = sg_link_bandwidth(links[i]);
- if (bandwidth < min_bandwidth || min_bandwidth == -1.0)
- min_bandwidth = bandwidth;
- }
-
- 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 bytes_amount the communication amount you want to evaluate (in bytes)
- * \return an approximative estimated communication time for the given bytes amount
- * between the workstations (in seconds)
- */
-double SD_route_get_communication_time(sg_host_t src,
- sg_host_t dst,
- double bytes_amount)
-{
-
-
- /* total time = latency + transmission time of the slowest link
- transmission time of a link = communication amount / link bandwidth */
-
- const SD_link_t *links;