Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
convert getCname to get_cname
[simgrid.git] / src / surf / cpu_cas01.cpp
index 213ec2e..a9a8110 100644 (file)
@@ -185,7 +185,7 @@ CpuAction *CpuCas01::sleep(double duration)
   if (duration > 0)
     duration = std::max(duration, sg_surf_precision);
 
-  XBT_IN("(%s,%g)", getCname(), duration);
+  XBT_IN("(%s,%g)", get_cname(), duration);
   CpuCas01Action* action = new CpuCas01Action(model(), 1.0, isOff(), speed_.scale * speed_.peak, constraint());
 
   // FIXME: sleep variables should not consume 1.0 in System::expand()
@@ -200,7 +200,7 @@ CpuAction *CpuCas01::sleep(double duration)
 
   model()->get_maxmin_system()->update_variable_weight(action->get_variable(), 0.0);
   if (model()->get_update_algorithm() == kernel::resource::Model::UpdateAlgo::Lazy) { // remove action from the heap
-    action->heapRemove();
+    model()->get_action_heap().remove(action);
     // this is necessary for a variable with weight 0 since such variables are ignored in lmm and we need to set its
     // max_duration correctly at the next call to share_resources
     model()->get_modified_set()->push_front(*action);