/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
XBT_DEBUG("Variable set : %zu", variable_set.size());
for (Variable& var : variable_set) {
var.value_ = 0.0;
XBT_DEBUG("Variable set : %zu", variable_set.size());
for (Variable& var : variable_set) {
var.value_ = 0.0;
- for (Constraint& cnst : active_constraint_set) {
- saturated_constraint_set.push_back(cnst);
- }
+ saturated_constraint_set.insert(saturated_constraint_set.end(), active_constraint_set.begin(),
+ active_constraint_set.end());
for (auto iter = std::begin(cnst_list); iter != std::end(cnst_list);) {
Constraint& cnst = *iter;
XBT_DEBUG("Updating cnst %p ", &cnst);
for (auto iter = std::begin(cnst_list); iter != std::end(cnst_list);) {
Constraint& cnst = *iter;
XBT_DEBUG("Updating cnst %p ", &cnst);
for (const Element& elem : cnst.enabled_element_set_) {
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_);
for (const Element& elem : cnst.enabled_element_set_) {
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);
+ double_update(&cnst.remaining_, elem.consumption_weight * elem.variable->mu_, sg_precision_workamount);
cnst.usage_ = std::min(cnst.usage_, elem.consumption_weight * elem.variable->mu_);
}
XBT_DEBUG("\tUpdate constraint %p (%g) by %g", &cnst, cnst.remaining_, cnst.usage_);
cnst.usage_ = std::min(cnst.usage_, elem.consumption_weight * elem.variable->mu_);
}
XBT_DEBUG("\tUpdate constraint %p (%g) by %g", &cnst, cnst.remaining_, cnst.usage_);