- action->m_latCurrent = action->m_latency;
- action->m_latency *= latencyFactor(size);
- action->m_rate = bandwidthConstraint(action->m_rate, bandwidth_bound, size);
- if (m_haveGap) {
- xbt_assert(!xbt_dynar_is_empty(route),
- "Using a model with a gap (e.g., SMPI) with a platform without links (e.g. vivaldi)!!!");
-
- link = *static_cast<NetworkCm02Link **>(xbt_dynar_get_ptr(route, 0));
- gapAppend(size, link, action);
- XBT_DEBUG("Comm %p: %s -> %s gap=%f (lat=%f)",
- action, src->name(), dst->name(), action->m_senderGap,
- action->m_latency);
+ for (auto const& link : *route) {
+ double bb = bandwidthFactor(size) * link->bandwidth();
+ bandwidth_bound = (bandwidth_bound < 0.0) ? bb : std::min(bandwidth_bound, bb);