Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
rename next_occuring_event() into nextOccuringEvent()
[simgrid.git] / src / surf / surf_interface.cpp
index 619535f..66dad37 100644 (file)
@@ -393,18 +393,18 @@ Model::~Model(){
   delete doneActionSet_;
 }
 
-double Model::next_occuring_event(double now)
+double Model::nextOccuringEvent(double now)
 {
   //FIXME: set the good function once and for all
   if (updateMechanism_ == UM_LAZY)
-    return next_occuring_event_lazy(now);
+    return nextOccuringEventLazy(now);
   else if (updateMechanism_ == UM_FULL)
-    return next_occuring_event_full(now);
+    return nextOccuringEventFull(now);
   else
     xbt_die("Invalid cpu update mechanism!");
 }
 
-double Model::next_occuring_event_lazy(double now)
+double Model::nextOccuringEventLazy(double now)
 {
   XBT_DEBUG("Before share resources, the size of modified actions set is %zd", modifiedSet_->size());
   lmm_solve(maxminSystem_);
@@ -471,19 +471,11 @@ double Model::next_occuring_event_lazy(double now)
   }
 }
 
-double Model::next_occuring_event_full(double /*now*/) {
-  THROW_UNIMPLEMENTED;
-  return 0.0;
-}
-
-double Model::shareResourcesMaxMin(ActionList *runningActions,
-                          lmm_system_t sys,
-                          void (*solve) (lmm_system_t))
-{
-  solve(sys);
+double Model::nextOccuringEventFull(double /*now*/) {
+  maxminSystem_->solve_fun(maxminSystem_);
 
   double min = -1;
-  for(auto it(runningActions->begin()), itend(runningActions->end()); it != itend ; ++it) {
+  for (auto it(getRunningActionSet()->begin()), itend(getRunningActionSet()->end()); it != itend ; ++it) {
     Action *action = &*it;
     double value = lmm_variable_getvalue(action->getVariable());
     if (value > 0) {