X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/160df614083997dc8f03750ff3ceaff458fa3fe0..76e8bf7e84d35a0d3442f7f1e9ba5927db1d4fb5:/src/kernel/lmm/fair_bottleneck.cpp diff --git a/src/kernel/lmm/fair_bottleneck.cpp b/src/kernel/lmm/fair_bottleneck.cpp index e50d3a7574..1db07048bf 100644 --- a/src/kernel/lmm/fair_bottleneck.cpp +++ b/src/kernel/lmm/fair_bottleneck.cpp @@ -29,13 +29,13 @@ void simgrid::kernel::lmm::FairBottleneck::bottleneck_solve() for (Variable& var : variable_set) { var.value_ = 0.0; XBT_DEBUG("Handling variable %p", &var); - if (var.sharing_weight_ > 0.0 && std::find_if(begin(var.cnsts_), end(var.cnsts_), [](Element const& x) { - return x.consumption_weight != 0.0; - }) != end(var.cnsts_)) { + if (var.sharing_penalty_ > 0.0 && std::find_if(begin(var.cnsts_), end(var.cnsts_), [](Element const& x) { + return x.consumption_weight != 0.0; + }) != end(var.cnsts_)) { saturated_variable_set.push_back(var); } else { XBT_DEBUG("Err, finally, there is no need to take care of variable %p", &var); - if (var.sharing_weight_ > 0.0) + if (var.sharing_penalty_ > 0.0) var.value_ = 1.0; } } @@ -68,7 +68,7 @@ void simgrid::kernel::lmm::FairBottleneck::bottleneck_solve() XBT_DEBUG("Processing cnst %p ", &cnst); cnst.usage_ = 0.0; for (Element& elem : cnst.enabled_element_set_) { - xbt_assert(elem.variable->sharing_weight_ > 0); + xbt_assert(elem.variable->sharing_penalty_ > 0); if (elem.consumption_weight > 0 && elem.variable->saturated_variable_set_hook_.is_linked()) nb++; } @@ -109,14 +109,14 @@ void simgrid::kernel::lmm::FairBottleneck::bottleneck_solve() XBT_DEBUG("Updating cnst %p ", &cnst); if (cnst.sharing_policy_ != s4u::Link::SharingPolicy::FATPIPE) { for (Element& elem : cnst.enabled_element_set_) { - xbt_assert(elem.variable->sharing_weight_ > 0); + xbt_assert(elem.variable->sharing_penalty_ > 0); XBT_DEBUG("\tUpdate constraint %p (%g) with variable %p by %g", &cnst, cnst.remaining_, elem.variable, elem.variable->mu_); double_update(&cnst.remaining_, elem.consumption_weight * elem.variable->mu_, sg_maxmin_precision); } } else { for (Element& elem : cnst.enabled_element_set_) { - xbt_assert(elem.variable->sharing_weight_ > 0); + xbt_assert(elem.variable->sharing_penalty_ > 0); XBT_DEBUG("\tNon-Shared variable. Update constraint usage of %p (%g) with variable %p by %g", &cnst, cnst.usage_, elem.variable, elem.variable->mu_); cnst.usage_ = std::min(cnst.usage_, elem.consumption_weight * elem.variable->mu_); @@ -131,7 +131,7 @@ void simgrid::kernel::lmm::FairBottleneck::bottleneck_solve() iter = cnst_list.erase(iter); for (Element& elem : cnst.enabled_element_set_) { - if (elem.variable->sharing_weight_ <= 0) + if (elem.variable->sharing_penalty_ <= 0) break; if (elem.consumption_weight > 0 && elem.variable->saturated_variable_set_hook_.is_linked()) { XBT_DEBUG("\t\tGet rid of variable %p", elem.variable);