+ for (std::vector<ActiveComm*>::iterator it = root->ActiveCommsUp.begin(); it != root->ActiveCommsUp.end(); ++it) {
+ // compute inbound penalty
+ double my_penalty_in = 1.0;
+ int nb_comms = (*it)->destination->nbActiveCommsDown; // total number of incoming comms
+ if (nb_comms != 1)
+ my_penalty_in = ((*it)->destination->ActiveCommsDown)[root] // number of comm sent to dest by root node
+ * Be * (*it)->destination->ActiveCommsDown.size(); // number of different nodes sending to dest
+
+ double penalty = std::max(my_penalty_in, max_penalty_out);
+
+ double rate_before_update = (*it)->action->get_bound();
+ // save initial rate of the action
+ if ((*it)->init_rate == -1)
+ (*it)->init_rate = rate_before_update;
+
+ double penalized_bw = num_comm_out ? (*it)->init_rate / penalty : (*it)->init_rate;
+
+ if (not double_equals(penalized_bw, rate_before_update, sg_surf_precision)) {
+ XBT_DEBUG("%d->%d action %p penalty updated : bw now %f, before %f , initial rate %f", root->id,
+ (*it)->destination->id, (*it)->action, penalized_bw, (*it)->action->get_bound(), (*it)->init_rate);
+ get_maxmin_system()->update_variable_bound((*it)->action->get_variable(), penalized_bw);
+ } else {
+ XBT_DEBUG("%d->%d action %p penalty not updated : bw %f, initial rate %f", root->id, (*it)->destination->id,
+ (*it)->action, penalized_bw, (*it)->init_rate);