-/* Copyright (c) 2004-2022. The SimGrid Team. All rights reserved. */
+/* Copyright (c) 2004-2023. The SimGrid Team. All rights reserved. */
/* 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_LOG_EXTERNAL_DEFAULT_CATEGORY(ker_lmm);
-namespace simgrid {
-namespace kernel {
-namespace lmm {
+namespace simgrid::kernel::lmm {
using dyn_light_t = std::vector<int>;
/* INIT: Collect constraints that actually need to be saturated (i.e remaining and usage are strictly positive)
* into cnst_light_tab. */
cnst.dynamic_bound_ = cnst.bound_;
- if (cnst.get_sharing_policy() == Constraint::SharingPolicy::NONLINEAR && cnst.dyn_constraint_cb_) {
+ if ((cnst.get_sharing_policy() == Constraint::SharingPolicy::NONLINEAR || cnst.get_sharing_policy() == Constraint::SharingPolicy::WIFI) && cnst.dyn_constraint_cb_) {
cnst.dynamic_bound_ = cnst.dyn_constraint_cb_(cnst.bound_, cnst.concurrency_current_);
}
cnst.remaining_ = cnst.dynamic_bound_;
cnst.usage_ = elem.consumption_weight / elem.variable->sharing_penalty_;
elem.make_active();
- resource::Action* action = elem.variable->id_;
- if (modified_set_ && not action->is_within_modified_set())
- modified_set_->push_back(*action);
}
}
XBT_DEBUG("Constraint '%d' usage: %f remaining: %f concurrency: %i<=%i<=%i", cnst.rank_, cnst.usage_,
} while (cnst_light_num > 0);
}
-} // namespace lmm
-} // namespace kernel
-} // namespace simgrid
\ No newline at end of file
+} // namespace simgrid::kernel::lmm