X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/fe304706848f0a64477d4687b3ea97d5b9a0c35c..98236eba13100727f2421d07b097cf84416ef74e:/src/kernel/resource/Model.cpp diff --git a/src/kernel/resource/Model.cpp b/src/kernel/resource/Model.cpp index c0f2721e88..e17361db05 100644 --- a/src/kernel/resource/Model.cpp +++ b/src/kernel/resource/Model.cpp @@ -13,6 +13,7 @@ namespace kernel { namespace resource { Model::Model(Model::UpdateAlgo algo) : update_algorithm_(algo) {} +Model::~Model() = default; Action::ModifiedSet* Model::get_modified_set() const { @@ -25,18 +26,18 @@ void Model::set_maxmin_system(lmm::System* system) maxmin_system_.reset(system); } -double Model::next_occuring_event(double now) +double Model::next_occurring_event(double now) { // FIXME: set the good function once and for all if (update_algorithm_ == Model::UpdateAlgo::LAZY) - return next_occuring_event_lazy(now); + return next_occurring_event_lazy(now); else if (update_algorithm_ == Model::UpdateAlgo::FULL) - return next_occuring_event_full(now); + return next_occurring_event_full(now); else xbt_die("Invalid cpu update mechanism!"); } -double Model::next_occuring_event_lazy(double now) +double Model::next_occurring_event_lazy(double now) { XBT_DEBUG("Before share resources, the size of modified actions set is %zu", maxmin_system_->modified_set_->size()); maxmin_system_->lmm_solve(); @@ -51,7 +52,7 @@ double Model::next_occuring_event_lazy(double now) continue; /* bogus priority, skip it */ - if (action->get_priority() <= 0 || action->get_type() == ActionHeap::Type::latency) + if (action->get_sharing_penalty() <= 0 || action->get_type() == ActionHeap::Type::latency) continue; action->update_remains_lazy(now); @@ -76,7 +77,7 @@ double Model::next_occuring_event_lazy(double now) max_duration_flag = true; } - XBT_DEBUG("Action(%p) corresponds to variable %d", action, action->get_variable()->id_int); + XBT_DEBUG("Action(%p) corresponds to variable %d", action, action->get_variable()->rank_); XBT_DEBUG("Action(%p) Start %f. May finish at %f (got a share of %f). Max_duration %f", action, action->get_start_time(), min, share, action->get_max_duration()); @@ -99,7 +100,7 @@ double Model::next_occuring_event_lazy(double now) } } -double Model::next_occuring_event_full(double /*now*/) +double Model::next_occurring_event_full(double /*now*/) { maxmin_system_->solve();