Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
LMM: rename sharing_weight into sharing_penalty for sake of clarity
[simgrid.git] / src / surf / storage_n11.cpp
index 6704150..ecf5544 100644 (file)
@@ -79,7 +79,7 @@ void StorageN11Model::update_actions_state(double /*now*/, double delta)
     action.update_remains(lrint(action.get_variable()->get_value() * delta));
     action.update_max_duration(delta);
 
-    if (((action.get_remains_no_update() <= 0) && (action.get_variable()->get_weight() > 0)) ||
+    if (((action.get_remains_no_update() <= 0) && (action.get_variable()->get_penalty() > 0)) ||
         ((action.get_max_duration() != NO_MAX_DURATION) && (action.get_max_duration() <= 0))) {
       action.finish(Action::State::FINISHED);
     }
@@ -147,7 +147,7 @@ void StorageN11Action::suspend()
 {
   XBT_IN("(%p)", this);
   if (is_running()) {
-    get_model()->get_maxmin_system()->update_variable_weight(get_variable(), 0.0);
+    get_model()->get_maxmin_system()->update_variable_penalty(get_variable(), 0.0);
     set_suspend_state(Action::SuspendStates::SUSPENDED);
   }
   XBT_OUT();