Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Update copyright lines for 2023.
[simgrid.git] / src / kernel / lmm / maxmin.cpp
index c9dbc84..7cbe6cf 100644 (file)
@@ -1,4 +1,4 @@
-/* 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. */
@@ -7,9 +7,7 @@
 
 XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(ker_lmm);
 
-namespace simgrid {
-namespace kernel {
-namespace lmm {
+namespace simgrid::kernel::lmm {
 
 using dyn_light_t = std::vector<int>;
 
@@ -69,7 +67,7 @@ template <class CnstList> void MaxMin::maxmin_solve(CnstList& cnst_list)
     /* 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_;
@@ -86,9 +84,6 @@ template <class CnstList> void MaxMin::maxmin_solve(CnstList& cnst_list)
           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_,
@@ -232,6 +227,4 @@ template <class CnstList> void MaxMin::maxmin_solve(CnstList& cnst_list)
   } while (cnst_light_num > 0);
 }
 
-} // namespace lmm
-} // namespace kernel
-} // namespace simgrid
\ No newline at end of file
+} // namespace simgrid::kernel::lmm