X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/7fb4337fa68b21ac48b0160cc9461c5a87199598..dadfefc9f3cc6cf0fc28a9025307f9f08dc4ac96:/src/surf/surf_interface.cpp diff --git a/src/surf/surf_interface.cpp b/src/surf/surf_interface.cpp index 798c991f8b..66dad3794f 100644 --- a/src/surf/surf_interface.cpp +++ b/src/surf/surf_interface.cpp @@ -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,17 +471,11 @@ double Model::next_occuring_event_lazy(double now) } } -double Model::next_occuring_event_full(double /*now*/) { - THROW_UNIMPLEMENTED; - return 0.0; -} - -double 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) {