Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Update copyright lines for 2022.
[simgrid.git] / src / kernel / lmm / maxmin.cpp
index fba53b3..6b86fe0 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2004-2021. The SimGrid Team. All rights reserved.          */
+/* Copyright (c) 2004-2022. 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. */
@@ -823,7 +823,7 @@ void System::update_variable_penalty(Variable* var, double penalty)
   bool enabling_var  = (penalty > 0 && var->sharing_penalty_ <= 0);
   bool disabling_var = (penalty <= 0 && var->sharing_penalty_ > 0);
 
-  XBT_IN("(sys=%p, var=%p, penalty=%f)", this, var, penalty);
+  XBT_IN("(sys=%p, var=%p, var->sharing_penalty = %f, penalty=%f)", this, var, var->sharing_penalty_, penalty);
 
   modified_ = true;
 
@@ -843,6 +843,8 @@ void System::update_variable_penalty(Variable* var, double penalty)
     disable_var(var);
   } else {
     var->sharing_penalty_ = penalty;
+    if (not var->cnsts_.empty())
+      update_modified_set(var->cnsts_[0].constraint);
   }
 
   check_concurrency();