X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/39d24b63aa597b0ee886e0f98b2755eb27924b3e..8372ae97612f27b84e8d75aeeed9de0ba6d2ba6a:/src/kernel/resource/Model.cpp diff --git a/src/kernel/resource/Model.cpp b/src/kernel/resource/Model.cpp index e53dd16fc1..ee43169796 100644 --- a/src/kernel/resource/Model.cpp +++ b/src/kernel/resource/Model.cpp @@ -12,7 +12,7 @@ namespace simgrid { namespace kernel { namespace resource { -Model::Model() = default; +Model::Model(Model::UpdateAlgo algo) : update_algorithm_(algo) {} Model::~Model() { @@ -39,9 +39,9 @@ Action::ModifiedSet* Model::get_modified_set() const double Model::next_occuring_event(double now) { // FIXME: set the good function once and for all - if (update_mechanism_ == UM_LAZY) + if (update_algorithm_ == Model::UpdateAlgo::Lazy) return next_occuring_event_lazy(now); - else if (update_mechanism_ == UM_FULL) + else if (update_algorithm_ == Model::UpdateAlgo::Full) return next_occuring_event_full(now); else xbt_die("Invalid cpu update mechanism!"); @@ -140,9 +140,9 @@ double Model::next_occuring_event_full(double /*now*/) void Model::update_actions_state(double now, double delta) { - if (update_mechanism_ == UM_FULL) + if (update_algorithm_ == Model::UpdateAlgo::Full) update_actions_state_full(now, delta); - else if (update_mechanism_ == UM_LAZY) + else if (update_algorithm_ == Model::UpdateAlgo::Lazy) update_actions_state_lazy(now, delta); else xbt_die("Invalid cpu update mechanism!");