Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Remove useless intermediate variables.
[simgrid.git] / src / kernel / resource / Model.cpp
index 25a3ee6..5e73044 100644 (file)
@@ -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_mechanism_ == Model::UpdateAlgo::Lazy)
     return next_occuring_event_lazy(now);
-  else if (update_mechanism_ == UM_FULL)
+  else if (update_mechanism_ == Model::UpdateAlgo::Full)
     return next_occuring_event_full(now);
   else
     xbt_die("Invalid cpu update mechanism!");
@@ -50,7 +50,7 @@ double Model::next_occuring_event(double now)
 double Model::next_occuring_event_lazy(double now)
 {
   XBT_DEBUG("Before share resources, the size of modified actions set is %zu", maxmin_system_->modified_set_->size());
-  lmm_solve(maxmin_system_);
+  maxmin_system_->lmm_solve();
   XBT_DEBUG("After share resources, The size of modified actions set is %zu", maxmin_system_->modified_set_->size());
 
   while (not maxmin_system_->modified_set_->empty()) {
@@ -112,7 +112,7 @@ double Model::next_occuring_event_lazy(double now)
 
 double Model::next_occuring_event_full(double /*now*/)
 {
-  maxmin_system_->solve_fun(maxmin_system_);
+  maxmin_system_->solve();
 
   double min = -1;
 
@@ -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_mechanism_ == Model::UpdateAlgo::Full)
     update_actions_state_full(now, delta);
-  else if (update_mechanism_ == UM_LAZY)
+  else if (update_mechanism_ == Model::UpdateAlgo::Lazy)
     update_actions_state_lazy(now, delta);
   else
     xbt_die("Invalid cpu update mechanism!");