Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
start snake_casing resource::Model
authorMartin Quinson <martin.quinson@loria.fr>
Tue, 27 Mar 2018 06:38:39 +0000 (08:38 +0200)
committerMartin Quinson <martin.quinson@loria.fr>
Tue, 27 Mar 2018 06:53:47 +0000 (08:53 +0200)
26 files changed:
include/simgrid/kernel/resource/Model.hpp
src/kernel/resource/Action.cpp
src/kernel/resource/Model.cpp
src/plugins/vm/VirtualMachineImpl.cpp
src/plugins/vm/VirtualMachineImpl.hpp
src/surf/cpu_cas01.cpp
src/surf/cpu_interface.cpp
src/surf/cpu_interface.hpp
src/surf/cpu_ti.cpp
src/surf/cpu_ti.hpp
src/surf/host_clm03.cpp
src/surf/host_clm03.hpp
src/surf/network_cm02.cpp
src/surf/network_cm02.hpp
src/surf/network_constant.cpp
src/surf/network_constant.hpp
src/surf/network_interface.cpp
src/surf/network_interface.hpp
src/surf/network_ns3.cpp
src/surf/network_ns3.hpp
src/surf/ptask_L07.cpp
src/surf/ptask_L07.hpp
src/surf/storage_n11.cpp
src/surf/storage_n11.hpp
src/surf/surf_c_bindings.cpp
teshsuite/surf/surf_usage/surf_usage.cpp

index 541bbd9..dc228ad 100644 (file)
@@ -35,22 +35,22 @@ public:
   virtual ~Model();
 
   /** @brief Get the set of [actions](@ref Action) in *ready* state */
-  Action::StateSet* getReadyActionSet() const { return ready_action_set_; }
+  Action::StateSet* get_ready_action_set() const { return ready_action_set_; }
 
   /** @brief Get the set of [actions](@ref Action) in *running* state */
-  Action::StateSet* getRunningActionSet() const { return running_action_set_; }
+  Action::StateSet* get_running_action_set() const { return running_action_set_; }
 
   /** @brief Get the set of [actions](@ref Action) in *failed* state */
-  Action::StateSet* getFailedActionSet() const { return failed_action_set_; }
+  Action::StateSet* get_failed_action_set() const { return failed_action_set_; }
 
   /** @brief Get the set of [actions](@ref Action) in *done* state */
-  Action::StateSet* getDoneActionSet() const { return done_action_set_; }
+  Action::StateSet* get_done_action_set() const { return done_action_set_; }
 
   /** @brief Get the set of modified [actions](@ref Action) */
-  Action::ModifiedSet* getModifiedSet() const;
+  Action::ModifiedSet* get_modified_set() const;
 
   /** @brief Get the maxmin system of the current Model */
-  lmm::System* getMaxminSystem() const { return maxmin_system_; }
+  lmm::System* get_maxmin_system() const { return maxmin_system_; }
 
   /**
    * @brief Get the update mechanism of the current Model
@@ -72,9 +72,9 @@ public:
    * @param now The current time of the simulation
    * @return The delta of time till the next action will finish
    */
-  virtual double nextOccuringEvent(double now);
-  virtual double nextOccuringEventLazy(double now);
-  virtual double nextOccuringEventFull(double now);
+  virtual double next_occuring_event(double now);
+  virtual double next_occuring_event_lazy(double now);
+  virtual double next_occuring_event_full(double now);
 
   /**
    * @brief Update action to the current time
@@ -82,9 +82,9 @@ public:
    * @param now The current time of the simulation
    * @param delta The delta of time since the last update
    */
-  virtual void updateActionsState(double now, double delta);
-  virtual void updateActionsStateLazy(double now, double delta);
-  virtual void updateActionsStateFull(double now, double delta);
+  virtual void update_actions_state(double now, double delta);
+  virtual void update_actions_state_lazy(double now, double delta);
+  virtual void update_actions_state_full(double now, double delta);
 
   /** @brief Returns whether this model have an idempotent shareResource()
    *
index 52a857c..9de1225 100644 (file)
@@ -23,9 +23,9 @@ Action::Action(simgrid::kernel::resource::Model* model, double cost, bool failed
     : remains_(cost), start_time_(surf_get_clock()), cost_(cost), model_(model), variable_(var)
 {
   if (failed)
-    state_set_ = get_model()->getFailedActionSet();
+    state_set_ = get_model()->get_failed_action_set();
   else
-    state_set_ = get_model()->getRunningActionSet();
+    state_set_ = get_model()->get_running_action_set();
 
   state_set_->push_back(*this);
 }
@@ -35,12 +35,12 @@ Action::~Action()
   if (state_set_hook_.is_linked())
     simgrid::xbt::intrusive_erase(*state_set_, *this);
   if (get_variable())
-    get_model()->getMaxminSystem()->variable_free(get_variable());
+    get_model()->get_maxmin_system()->variable_free(get_variable());
   if (get_model()->getUpdateMechanism() == UM_LAZY) {
     /* remove from heap */
     heapRemove();
     if (modified_set_hook_.is_linked())
-      simgrid::xbt::intrusive_erase(*get_model()->getModifiedSet(), *this);
+      simgrid::xbt::intrusive_erase(*get_model()->get_modified_set(), *this);
   }
 
   xbt_free(category_);
@@ -55,13 +55,13 @@ void Action::finish(Action::State state)
 
 Action::State Action::get_state() const
 {
-  if (state_set_ == model_->getReadyActionSet())
+  if (state_set_ == model_->get_ready_action_set())
     return Action::State::ready;
-  if (state_set_ == model_->getRunningActionSet())
+  if (state_set_ == model_->get_running_action_set())
     return Action::State::running;
-  if (state_set_ == model_->getFailedActionSet())
+  if (state_set_ == model_->get_failed_action_set())
     return Action::State::failed;
-  if (state_set_ == model_->getDoneActionSet())
+  if (state_set_ == model_->get_done_action_set())
     return Action::State::done;
   return Action::State::not_in_the_system;
 }
@@ -71,16 +71,16 @@ void Action::set_state(Action::State state)
   simgrid::xbt::intrusive_erase(*state_set_, *this);
   switch (state) {
     case Action::State::ready:
-      state_set_ = model_->getReadyActionSet();
+      state_set_ = model_->get_ready_action_set();
       break;
     case Action::State::running:
-      state_set_ = model_->getRunningActionSet();
+      state_set_ = model_->get_running_action_set();
       break;
     case Action::State::failed:
-      state_set_ = model_->getFailedActionSet();
+      state_set_ = model_->get_failed_action_set();
       break;
     case Action::State::done:
-      state_set_ = model_->getDoneActionSet();
+      state_set_ = model_->get_done_action_set();
       break;
     default:
       state_set_ = nullptr;
@@ -99,7 +99,7 @@ void Action::set_bound(double bound)
 {
   XBT_IN("(%p,%g)", this, bound);
   if (variable_)
-    get_model()->getMaxminSystem()->update_variable_bound(variable_, bound);
+    get_model()->get_maxmin_system()->update_variable_bound(variable_, bound);
 
   if (get_model()->getUpdateMechanism() == UM_LAZY && get_last_update() != surf_get_clock())
     heapRemove();
@@ -127,7 +127,7 @@ void Action::set_priority(double weight)
 {
   XBT_IN("(%p,%g)", this, weight);
   sharing_priority_ = weight;
-  get_model()->getMaxminSystem()->update_variable_weight(get_variable(), weight);
+  get_model()->get_maxmin_system()->update_variable_weight(get_variable(), weight);
 
   if (get_model()->getUpdateMechanism() == UM_LAZY)
     heapRemove();
@@ -139,7 +139,7 @@ void Action::cancel()
   set_state(Action::State::failed);
   if (get_model()->getUpdateMechanism() == UM_LAZY) {
     if (modified_set_hook_.is_linked())
-      simgrid::xbt::intrusive_erase(*get_model()->getModifiedSet(), *this);
+      simgrid::xbt::intrusive_erase(*get_model()->get_modified_set(), *this);
     heapRemove();
   }
 }
@@ -158,10 +158,10 @@ void Action::suspend()
 {
   XBT_IN("(%p)", this);
   if (suspended_ != SuspendStates::sleeping) {
-    get_model()->getMaxminSystem()->update_variable_weight(get_variable(), 0.0);
+    get_model()->get_maxmin_system()->update_variable_weight(get_variable(), 0.0);
     if (get_model()->getUpdateMechanism() == UM_LAZY) {
       heapRemove();
-      if (state_set_ == get_model()->getRunningActionSet() && sharing_priority_ > 0) {
+      if (state_set_ == get_model()->get_running_action_set() && sharing_priority_ > 0) {
         // If we have a lazy model, we need to update the remaining value accordingly
         update_remains_lazy(surf_get_clock());
       }
@@ -175,7 +175,7 @@ void Action::resume()
 {
   XBT_IN("(%p)", this);
   if (suspended_ != SuspendStates::sleeping) {
-    get_model()->getMaxminSystem()->update_variable_weight(get_variable(), get_priority());
+    get_model()->get_maxmin_system()->update_variable_weight(get_variable(), get_priority());
     suspended_ = SuspendStates::not_suspended;
     if (get_model()->getUpdateMechanism() == UM_LAZY)
       heapRemove();
index c257fff..25a3ee6 100644 (file)
@@ -31,23 +31,23 @@ Action* Model::actionHeapPop()
   return action;
 }
 
-Action::ModifiedSet* Model::getModifiedSet() const
+Action::ModifiedSet* Model::get_modified_set() const
 {
   return maxmin_system_->modified_set_;
 }
 
-double Model::nextOccuringEvent(double now)
+double Model::next_occuring_event(double now)
 {
   // FIXME: set the good function once and for all
   if (update_mechanism_ == UM_LAZY)
-    return nextOccuringEventLazy(now);
+    return next_occuring_event_lazy(now);
   else if (update_mechanism_ == UM_FULL)
-    return nextOccuringEventFull(now);
+    return next_occuring_event_full(now);
   else
     xbt_die("Invalid cpu update mechanism!");
 }
 
-double Model::nextOccuringEventLazy(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_);
@@ -56,7 +56,7 @@ double Model::nextOccuringEventLazy(double now)
   while (not maxmin_system_->modified_set_->empty()) {
     Action* action = &(maxmin_system_->modified_set_->front());
     maxmin_system_->modified_set_->pop_front();
-    bool max_dur_flag = false;
+    bool max_duration_flag = false;
 
     if (action->get_state_set() != running_action_set_)
       continue;
@@ -84,7 +84,7 @@ double Model::nextOccuringEventLazy(double now)
         (min <= -1 || action->get_start_time() + action->get_max_duration() < min)) {
       // when the task will complete anyway because of the deadline if any
       min          = action->get_start_time() + action->get_max_duration();
-      max_dur_flag = true;
+      max_duration_flag = true;
     }
 
     XBT_DEBUG("Action(%p) corresponds to variable %d", action, action->get_variable()->id_int);
@@ -93,7 +93,7 @@ double Model::nextOccuringEventLazy(double now)
               action->get_start_time(), min, share, action->get_max_duration());
 
     if (min > -1) {
-      action->heapUpdate(min, max_dur_flag ? Action::Type::MAX_DURATION : Action::Type::NORMAL);
+      action->heapUpdate(min, max_duration_flag ? Action::Type::MAX_DURATION : Action::Type::NORMAL);
       XBT_DEBUG("Insert at heap action(%p) min %f now %f", action, min, now);
     } else
       DIE_IMPOSSIBLE;
@@ -110,13 +110,13 @@ double Model::nextOccuringEventLazy(double now)
   }
 }
 
-double Model::nextOccuringEventFull(double /*now*/)
+double Model::next_occuring_event_full(double /*now*/)
 {
   maxmin_system_->solve_fun(maxmin_system_);
 
   double min = -1;
 
-  for (Action& action : *getRunningActionSet()) {
+  for (Action& action : *get_running_action_set()) {
     double value = action.get_variable()->get_value();
     if (value > 0) {
       if (action.get_remains() > 0)
@@ -138,22 +138,22 @@ double Model::nextOccuringEventFull(double /*now*/)
   return min;
 }
 
-void Model::updateActionsState(double now, double delta)
+void Model::update_actions_state(double now, double delta)
 {
   if (update_mechanism_ == UM_FULL)
-    updateActionsStateFull(now, delta);
+    update_actions_state_full(now, delta);
   else if (update_mechanism_ == UM_LAZY)
-    updateActionsStateLazy(now, delta);
+    update_actions_state_lazy(now, delta);
   else
     xbt_die("Invalid cpu update mechanism!");
 }
 
-void Model::updateActionsStateLazy(double /*now*/, double /*delta*/)
+void Model::update_actions_state_lazy(double /*now*/, double /*delta*/)
 {
   THROW_UNIMPLEMENTED;
 }
 
-void Model::updateActionsStateFull(double /*now*/, double /*delta*/)
+void Model::update_actions_state_full(double /*now*/, double /*delta*/)
 {
   THROW_UNIMPLEMENTED;
 }
index 4a3881d..6eeac3d 100644 (file)
@@ -61,7 +61,7 @@ VMModel::VMModel()
   s4u::Host::onStateChange.connect(hostStateChange);
 }
 
-double VMModel::nextOccuringEvent(double now)
+double VMModel::next_occuring_event(double now)
 {
   /* TODO: update action's cost with the total cost of processes on the VM. */
 
@@ -98,7 +98,7 @@ double VMModel::nextOccuringEvent(double now)
     XBT_DEBUG("assign %f to vm %s @ pm %s", solved_value, ws_vm->getCname(), ws_vm->getPm()->getCname());
 
     xbt_assert(cpu->model() == surf_cpu_model_vm);
-    kernel::lmm::System* vcpu_system = cpu->model()->getMaxminSystem();
+    kernel::lmm::System* vcpu_system = cpu->model()->get_maxmin_system();
     vcpu_system->update_constraint_bound(cpu->constraint(), virt_overhead * solved_value);
   }
 
@@ -106,7 +106,7 @@ double VMModel::nextOccuringEvent(double now)
   ignoreEmptyVmInPmLMM();
 
   /* 3. Ready. Get the next occurring event */
-  return surf_cpu_model_vm->nextOccuringEvent(now);
+  return surf_cpu_model_vm->next_occuring_event(now);
 }
 
 /************
index e567125..575103b 100644 (file)
@@ -100,8 +100,8 @@ public:
   VMModel();
   void ignoreEmptyVmInPmLMM() override{};
 
-  double nextOccuringEvent(double now) override;
-  void updateActionsState(double /*now*/, double /*delta*/) override{};
+  double next_occuring_event(double now) override;
+  void update_actions_state(double /*now*/, double /*delta*/) override{};
 };
 }
 }
index b19c922..52d7f2c 100644 (file)
@@ -71,7 +71,7 @@ Cpu *CpuCas01Model::createCpu(simgrid::s4u::Host *host, std::vector<double> *spe
  * Resource *
  ************/
 CpuCas01::CpuCas01(CpuCas01Model* model, simgrid::s4u::Host* host, std::vector<double>* speedPerPstate, int core)
-    : Cpu(model, host, model->getMaxminSystem()->constraint_new(this, core * speedPerPstate->front()), speedPerPstate,
+    : Cpu(model, host, model->get_maxmin_system()->constraint_new(this, core * speedPerPstate->front()), speedPerPstate,
           core)
 {
 }
@@ -88,7 +88,7 @@ std::vector<double> * CpuCas01::getSpeedPeakList(){
 
 bool CpuCas01::isUsed()
 {
-  return model()->getMaxminSystem()->constraint_used(constraint());
+  return model()->get_maxmin_system()->constraint_used(constraint());
 }
 
 /** @brief take into account changes of speed (either load or max) */
@@ -96,12 +96,12 @@ void CpuCas01::onSpeedChange() {
   kernel::lmm::Variable* var = nullptr;
   const_lmm_element_t elem = nullptr;
 
-  model()->getMaxminSystem()->update_constraint_bound(constraint(), coresAmount_ * speed_.scale * speed_.peak);
+  model()->get_maxmin_system()->update_constraint_bound(constraint(), coresAmount_ * speed_.scale * speed_.peak);
   while ((var = constraint()->get_variable(&elem))) {
     CpuCas01Action* action = static_cast<CpuCas01Action*>(var->get_id());
 
-    model()->getMaxminSystem()->update_variable_bound(action->get_variable(),
-                                                      action->requestedCore() * speed_.scale * speed_.peak);
+    model()->get_maxmin_system()->update_variable_bound(action->get_variable(),
+                                                        action->requestedCore() * speed_.scale * speed_.peak);
   }
 
   Cpu::onSpeedChange();
@@ -180,12 +180,12 @@ CpuAction *CpuCas01::sleep(double duration)
     action->get_state_set()->push_back(*action);
   }
 
-  model()->getMaxminSystem()->update_variable_weight(action->get_variable(), 0.0);
+  model()->get_maxmin_system()->update_variable_weight(action->get_variable(), 0.0);
   if (model()->getUpdateMechanism() == UM_LAZY) { // remove action from the heap
     action->heapRemove();
     // this is necessary for a variable with weight 0 since such variables are ignored in lmm and we need to set its
     // max_duration correctly at the next call to share_resources
-    model()->getModifiedSet()->push_front(*action);
+    model()->get_modified_set()->push_front(*action);
   }
 
   XBT_OUT();
@@ -198,14 +198,14 @@ CpuAction *CpuCas01::sleep(double duration)
 CpuCas01Action::CpuCas01Action(kernel::resource::Model* model, double cost, bool failed, double speed,
                                kernel::lmm::Constraint* constraint, int requestedCore)
     : CpuAction(model, cost, failed,
-                model->getMaxminSystem()->variable_new(this, 1.0 / requestedCore, requestedCore * speed, 1))
+                model->get_maxmin_system()->variable_new(this, 1.0 / requestedCore, requestedCore * speed, 1))
     , requestedCore_(requestedCore)
 {
   if (model->getUpdateMechanism() == UM_LAZY) {
     set_last_update();
     set_last_value(0.0);
   }
-  model->getMaxminSystem()->expand(constraint, get_variable(), 1.0);
+  model->get_maxmin_system()->expand(constraint, get_variable(), 1.0);
 }
 
 CpuCas01Action::CpuCas01Action(kernel::resource::Model* model, double cost, bool failed, double speed,
index 4307bd8..bbac0ef 100644 (file)
@@ -20,7 +20,7 @@ namespace surf {
  * Model *
  *********/
 
-void CpuModel::updateActionsStateLazy(double now, double /*delta*/)
+void CpuModel::update_actions_state_lazy(double now, double /*delta*/)
 {
   while (not actionHeapIsEmpty() && double_equals(actionHeapTopDate(), now, sg_surf_precision)) {
 
@@ -39,7 +39,7 @@ void CpuModel::updateActionsStateLazy(double now, double /*delta*/)
     //defining the last timestamp that we can safely dump to trace file
     //without losing the event ascending order (considering all CPU's)
     double smaller = -1;
-    for (kernel::resource::Action const& action : *getRunningActionSet()) {
+    for (kernel::resource::Action const& action : *get_running_action_set()) {
       if (smaller < 0 || action.get_last_update() < smaller)
         smaller = action.get_last_update();
     }
@@ -49,9 +49,9 @@ void CpuModel::updateActionsStateLazy(double now, double /*delta*/)
   }
 }
 
-void CpuModel::updateActionsStateFull(double now, double delta)
+void CpuModel::update_actions_state_full(double now, double delta)
 {
-  for (auto it = std::begin(*getRunningActionSet()); it != std::end(*getRunningActionSet());) {
+  for (auto it = std::begin(*get_running_action_set()); it != std::end(*get_running_action_set());) {
     CpuAction& action = static_cast<CpuAction&>(*it);
     ++it; // increment iterator here since the following calls to action.finish() may invalidate it
     if (TRACE_is_enabled()) {
@@ -172,7 +172,8 @@ void Cpu::setSpeedTrace(tmgr_trace_t trace)
 
 void CpuAction::update_remains_lazy(double now)
 {
-  xbt_assert(get_state_set() == get_model()->getRunningActionSet(), "You're updating an action that is not running.");
+  xbt_assert(get_state_set() == get_model()->get_running_action_set(),
+             "You're updating an action that is not running.");
   xbt_assert(get_priority() > 0, "You're updating an action that seems suspended.");
 
   double delta = now - get_last_update();
index 8b66b85..375c1d7 100644 (file)
@@ -35,8 +35,8 @@ public:
    */
   virtual Cpu *createCpu(simgrid::s4u::Host *host, std::vector<double> *speedPerPstate, int core)=0;
 
-  void updateActionsStateLazy(double now, double delta) override;
-  void updateActionsStateFull(double now, double delta) override;
+  void update_actions_state_lazy(double now, double delta) override;
+  void update_actions_state_full(double now, double delta) override;
 };
 
 /************
index f4db720..4fc9b6c 100644 (file)
@@ -336,7 +336,7 @@ Cpu *CpuTiModel::createCpu(simgrid::s4u::Host *host, std::vector<double>* speedP
   return new CpuTi(this, host, speedPerPstate, core);
 }
 
-double CpuTiModel::nextOccuringEvent(double now)
+double CpuTiModel::next_occuring_event(double now)
 {
   double min_action_duration = -1;
 
@@ -356,7 +356,7 @@ double CpuTiModel::nextOccuringEvent(double now)
   return min_action_duration;
 }
 
-void CpuTiModel::updateActionsState(double now, double /*delta*/)
+void CpuTiModel::update_actions_state(double now, double /*delta*/)
 {
   while (not actionHeapIsEmpty() && actionHeapTopDate() <= now) {
     CpuTiAction* action = static_cast<CpuTiAction*>(actionHeapPop());
@@ -463,7 +463,7 @@ void CpuTi::updateActionsFinishTime(double now)
 
   for (CpuTiAction const& action : actionSet_) {
     /* action not running, skip it */
-    if (action.get_state_set() != surf_cpu_model_pm->getRunningActionSet())
+    if (action.get_state_set() != surf_cpu_model_pm->get_running_action_set())
       continue;
 
     /* bogus priority, skip it */
@@ -481,7 +481,7 @@ void CpuTi::updateActionsFinishTime(double now)
   for (CpuTiAction& action : actionSet_) {
     double min_finish = -1;
     /* action not running, skip it */
-    if (action.get_state_set() != surf_cpu_model_pm->getRunningActionSet())
+    if (action.get_state_set() != surf_cpu_model_pm->get_running_action_set())
       continue;
 
     /* verify if the action is really running on cpu */
@@ -540,7 +540,7 @@ void CpuTi::updateRemainingAmount(double now)
   XBT_DEBUG("Flops total: %f, Last update %f", area_total, lastUpdate_);
   for (CpuTiAction& action : actionSet_) {
     /* action not running, skip it */
-    if (action.get_state_set() != model()->getRunningActionSet())
+    if (action.get_state_set() != model()->get_running_action_set())
       continue;
 
     /* bogus priority, skip it */
index 375de18..ec9d0a0 100644 (file)
@@ -148,8 +148,8 @@ public:
   CpuTiModel() = default;
   ~CpuTiModel() override;
   Cpu *createCpu(simgrid::s4u::Host *host,  std::vector<double>* speedPerPstate, int core) override;
-  double nextOccuringEvent(double now) override;
-  void updateActionsState(double now, double delta) override;
+  double next_occuring_event(double now) override;
+  void update_actions_state(double now, double delta) override;
 
   kernel::resource::Action::StateSet runningActionSetThatDoesNotNeedBeingChecked_;
   CpuTiList modifiedCpu_;
index e11489f..bada373 100644 (file)
@@ -45,12 +45,14 @@ void surf_host_model_init_compound()
 namespace simgrid {
 namespace surf {
 
-double HostCLM03Model::nextOccuringEvent(double now){
+double HostCLM03Model::next_occuring_event(double now)
+{
   ignoreEmptyVmInPmLMM();
 
-  double min_by_cpu = surf_cpu_model_pm->nextOccuringEvent(now);
-  double min_by_net = surf_network_model->nextOccuringEventIsIdempotent() ? surf_network_model->nextOccuringEvent(now) : -1;
-  double min_by_sto = surf_storage_model->nextOccuringEvent(now);
+  double min_by_cpu = surf_cpu_model_pm->next_occuring_event(now);
+  double min_by_net =
+      surf_network_model->nextOccuringEventIsIdempotent() ? surf_network_model->next_occuring_event(now) : -1;
+  double min_by_sto = surf_storage_model->next_occuring_event(now);
 
   XBT_DEBUG("model %p, %s min_by_cpu %f, %s min_by_net %f, %s min_by_sto %f",
       this, typeid(surf_cpu_model_pm).name(), min_by_cpu,
@@ -67,7 +69,8 @@ double HostCLM03Model::nextOccuringEvent(double now){
   return res;
 }
 
-void HostCLM03Model::updateActionsState(double /*now*/, double /*delta*/){
+void HostCLM03Model::update_actions_state(double /*now*/, double /*delta*/)
+{
   /* I won't do what you tell me */
 }
 
index b9da9f5..cec2349 100644 (file)
@@ -29,8 +29,8 @@ class XBT_PRIVATE HostCLM03Model;
 
 class HostCLM03Model : public HostModel {
 public:
-  double nextOccuringEvent(double now) override;
-  void updateActionsState(double now, double delta) override;
+  double next_occuring_event(double now) override;
+  void update_actions_state(double now, double delta) override;
 };
 }
 }
index 01a14ea..e0c2bd9 100644 (file)
@@ -169,7 +169,7 @@ LinkImpl* NetworkCm02Model::createLink(const std::string& name, double bandwidth
   return new NetworkCm02Link(this, name, bandwidth, latency, policy, maxmin_system_);
 }
 
-void NetworkCm02Model::updateActionsStateLazy(double now, double /*delta*/)
+void NetworkCm02Model::update_actions_state_lazy(double now, double /*delta*/)
 {
   while (not actionHeapIsEmpty() && double_equals(actionHeapTopDate(), now, sg_surf_precision)) {
 
@@ -206,10 +206,9 @@ void NetworkCm02Model::updateActionsStateLazy(double now, double /*delta*/)
   }
 }
 
-
-void NetworkCm02Model::updateActionsStateFull(double now, double delta)
+void NetworkCm02Model::update_actions_state_full(double now, double delta)
 {
-  for (auto it = std::begin(*getRunningActionSet()); it != std::end(*getRunningActionSet());) {
+  for (auto it = std::begin(*get_running_action_set()); it != std::end(*get_running_action_set());) {
     NetworkCm02Action& action = static_cast<NetworkCm02Action&>(*it);
     ++it; // increment iterator here since the following calls to action.finish() may invalidate it
     XBT_DEBUG("Something happened to action %p", &action);
@@ -405,8 +404,8 @@ void NetworkCm02Link::setBandwidth(double value)
 {
   bandwidth_.peak = value;
 
-  model()->getMaxminSystem()->update_constraint_bound(constraint(),
-                                                      sg_bandwidth_factor * (bandwidth_.peak * bandwidth_.scale));
+  model()->get_maxmin_system()->update_constraint_bound(constraint(),
+                                                        sg_bandwidth_factor * (bandwidth_.peak * bandwidth_.scale));
   TRACE_surf_link_set_bandwidth(surf_get_clock(), getCname(), sg_bandwidth_factor * bandwidth_.peak * bandwidth_.scale);
 
   if (sg_weight_S_parameter > 0) {
@@ -420,7 +419,7 @@ void NetworkCm02Link::setBandwidth(double value)
       NetworkCm02Action* action = static_cast<NetworkCm02Action*>(var->get_id());
       action->weight_ += delta;
       if (not action->is_suspended())
-        model()->getMaxminSystem()->update_variable_weight(action->get_variable(), action->weight_);
+        model()->get_maxmin_system()->update_variable_weight(action->get_variable(), action->weight_);
     }
   }
 }
@@ -440,10 +439,10 @@ void NetworkCm02Link::setLatency(double value)
     action->latCurrent_ += delta;
     action->weight_ += delta;
     if (action->rate_ < 0)
-      model()->getMaxminSystem()->update_variable_bound(action->get_variable(),
-                                                        sg_tcp_gamma / (2.0 * action->latCurrent_));
+      model()->get_maxmin_system()->update_variable_bound(action->get_variable(),
+                                                          sg_tcp_gamma / (2.0 * action->latCurrent_));
     else {
-      model()->getMaxminSystem()->update_variable_bound(
+      model()->get_maxmin_system()->update_variable_bound(
           action->get_variable(), std::min(action->rate_, sg_tcp_gamma / (2.0 * action->latCurrent_)));
 
       if (action->rate_ < sg_tcp_gamma / (2.0 * action->latCurrent_)) {
@@ -453,7 +452,7 @@ void NetworkCm02Link::setLatency(double value)
       }
     }
     if (not action->is_suspended())
-      model()->getMaxminSystem()->update_variable_weight(action->get_variable(), action->weight_);
+      model()->get_maxmin_system()->update_variable_weight(action->get_variable(), action->weight_);
   }
 }
 
index aa76ddf..29d77fe 100644 (file)
@@ -40,8 +40,8 @@ public:
   virtual ~NetworkCm02Model() = default;
   LinkImpl* createLink(const std::string& name, double bandwidth, double latency,
                        e_surf_link_sharing_policy_t policy) override;
-  void updateActionsStateLazy(double now, double delta) override;
-  void updateActionsStateFull(double now, double delta) override;
+  void update_actions_state_lazy(double now, double delta) override;
+  void update_actions_state_full(double now, double delta) override;
   kernel::resource::Action* communicate(s4u::Host* src, s4u::Host* dst, double size, double rate) override;
 };
 
index 9424f59..ef66f50 100644 (file)
@@ -29,10 +29,10 @@ LinkImpl* NetworkConstantModel::createLink(const std::string& name, double bw, d
   return nullptr;
 }
 
-double NetworkConstantModel::nextOccuringEvent(double /*now*/)
+double NetworkConstantModel::next_occuring_event(double /*now*/)
 {
   double min = -1.0;
-  for (kernel::resource::Action const& action : *getRunningActionSet()) {
+  for (kernel::resource::Action const& action : *get_running_action_set()) {
     const NetworkConstantAction& net_action = static_cast<const NetworkConstantAction&>(action);
     if (net_action.latency_ > 0 && (min < 0 || net_action.latency_ < min))
       min = net_action.latency_;
@@ -40,9 +40,9 @@ double NetworkConstantModel::nextOccuringEvent(double /*now*/)
   return min;
 }
 
-void NetworkConstantModel::updateActionsState(double /*now*/, double delta)
+void NetworkConstantModel::update_actions_state(double /*now*/, double delta)
 {
-  for (auto it = std::begin(*getRunningActionSet()); it != std::end(*getRunningActionSet());) {
+  for (auto it = std::begin(*get_running_action_set()); it != std::end(*get_running_action_set());) {
     NetworkConstantAction& action = static_cast<NetworkConstantAction&>(*it);
     ++it; // increment iterator here since the following calls to action.finish() may invalidate it
     if (action.latency_ > 0) {
index 0336b1e..23c37ac 100644 (file)
@@ -27,8 +27,8 @@ namespace simgrid {
     public:
       kernel::resource::Action* communicate(simgrid::s4u::Host* src, simgrid::s4u::Host* dst, double size,
                                             double rate) override;
-      double nextOccuringEvent(double now) override;
-      void updateActionsState(double now, double delta) override;
+      double next_occuring_event(double now) override;
+      void update_actions_state(double now, double delta) override;
 
       LinkImpl* createLink(const std::string& name, double bw, double lat,
                            e_surf_link_sharing_policy_t policy) override;
index 1834d38..6cc6da9 100644 (file)
@@ -80,11 +80,11 @@ namespace simgrid {
       return rate;
     }
 
-    double NetworkModel::nextOccuringEventFull(double now)
+    double NetworkModel::next_occuring_event_full(double now)
     {
-      double minRes = Model::nextOccuringEventFull(now);
+      double minRes = Model::next_occuring_event_full(now);
 
-      for (kernel::resource::Action const& action : *getRunningActionSet()) {
+      for (kernel::resource::Action const& action : *get_running_action_set()) {
         const NetworkAction& net_action = static_cast<const NetworkAction&>(action);
         if (net_action.latency_ > 0)
           minRes = (minRes < 0) ? net_action.latency_ : std::min(minRes, net_action.latency_);
@@ -133,7 +133,7 @@ namespace simgrid {
 
     bool LinkImpl::isUsed()
     {
-      return model()->getMaxminSystem()->constraint_used(constraint());
+      return model()->get_maxmin_system()->constraint_used(constraint());
     }
 
     double LinkImpl::latency()
index 36f2801..f141ecb 100644 (file)
@@ -104,7 +104,7 @@ public:
    * @return The new bandwidth.
    */
   virtual double bandwidthConstraint(double rate, double bound, double size);
-  double nextOccuringEventFull(double now) override;
+  double next_occuring_event_full(double now) override;
 
   LinkImpl* loopback_ = nullptr;
 };
index a11bc1f..f1ddedf 100644 (file)
@@ -180,13 +180,13 @@ kernel::resource::Action* NetworkNS3Model::communicate(s4u::Host* src, s4u::Host
   return new NetworkNS3Action(this, size, src, dst);
 }
 
-double NetworkNS3Model::nextOccuringEvent(double now)
+double NetworkNS3Model::next_occuring_event(double now)
 {
   double time_to_next_flow_completion;
   XBT_DEBUG("ns3_next_occuring_event");
 
   //get the first relevant value from the running_actions list
-  if (not getRunningActionSet()->size() || now == 0.0)
+  if (not get_running_action_set()->size() || now == 0.0)
     return -1.0;
   else
     do {
@@ -202,12 +202,12 @@ double NetworkNS3Model::nextOccuringEvent(double now)
   return time_to_next_flow_completion;
 }
 
-void NetworkNS3Model::updateActionsState(double now, double delta)
+void NetworkNS3Model::update_actions_state(double now, double delta)
 {
   static std::vector<std::string> socket_to_destroy;
 
   /* If there are no running flows, advance the NS3 simulator and return */
-  if (getRunningActionSet()->empty()) {
+  if (get_running_action_set()->empty()) {
 
     while(double_positive(now - ns3::Simulator::Now().GetSeconds(), sg_surf_precision))
       ns3_simulator(now-ns3::Simulator::Now().GetSeconds());
index a180ed2..542558e 100644 (file)
@@ -20,9 +20,9 @@ public:
   LinkImpl* createLink(const std::string& name, double bandwidth, double latency,
                        e_surf_link_sharing_policy_t policy) override;
   kernel::resource::Action* communicate(s4u::Host* src, s4u::Host* dst, double size, double rate) override;
-  double nextOccuringEvent(double now) override;
+  double next_occuring_event(double now) override;
   bool nextOccuringEventIsIdempotent() override { return false; }
-  void updateActionsState(double now, double delta) override;
+  void update_actions_state(double now, double delta) override;
 };
 
 /************
index 4a7d7c1..2497ebd 100644 (file)
@@ -67,10 +67,10 @@ NetworkL07Model::~NetworkL07Model()
   maxmin_system_ = nullptr;
 }
 
-double HostL07Model::nextOccuringEvent(double now)
+double HostL07Model::next_occuring_event(double now)
 {
-  double min = HostModel::nextOccuringEventFull(now);
-  for (kernel::resource::Action const& action : *getRunningActionSet()) {
+  double min = HostModel::next_occuring_event_full(now);
+  for (kernel::resource::Action const& action : *get_running_action_set()) {
     const L07Action& net_action = static_cast<const L07Action&>(action);
     if (net_action.latency_ > 0 && (min < 0 || net_action.latency_ < min)) {
       min = net_action.latency_;
@@ -82,9 +82,9 @@ double HostL07Model::nextOccuringEvent(double now)
   return min;
 }
 
-void HostL07Model::updateActionsState(double /*now*/, double delta)
+void HostL07Model::update_actions_state(double /*now*/, double delta)
 {
-  for (auto it = std::begin(*getRunningActionSet()); it != std::end(*getRunningActionSet());) {
+  for (auto it = std::begin(*get_running_action_set()); it != std::end(*get_running_action_set());) {
     L07Action& action = static_cast<L07Action&>(*it);
     ++it; // increment iterator here since the following calls to action.finish() may invalidate it
     if (action.latency_ > 0) {
@@ -181,13 +181,13 @@ L07Action::L07Action(kernel::resource::Model* model, int host_nb, sg_host_t* hos
   XBT_DEBUG("Creating a parallel task (%p) with %d hosts and %d unique links.", this, host_nb, nb_link);
   latency_ = latency;
 
-  set_variable(model->getMaxminSystem()->variable_new(this, 1.0, (rate > 0 ? rate : -1.0), host_nb + nb_link));
+  set_variable(model->get_maxmin_system()->variable_new(this, 1.0, (rate > 0 ? rate : -1.0), host_nb + nb_link));
 
   if (latency_ > 0)
-    model->getMaxminSystem()->update_variable_weight(get_variable(), 0.0);
+    model->get_maxmin_system()->update_variable_weight(get_variable(), 0.0);
 
   for (int i = 0; i < host_nb; i++)
-    model->getMaxminSystem()->expand(host_list[i]->pimpl_cpu->constraint(), get_variable(), flops_amount[i]);
+    model->get_maxmin_system()->expand(host_list[i]->pimpl_cpu->constraint(), get_variable(), flops_amount[i]);
 
   if(bytes_amount != nullptr) {
     for (int i = 0; i < host_nb; i++) {
@@ -197,8 +197,8 @@ L07Action::L07Action(kernel::resource::Model* model, int host_nb, sg_host_t* hos
           hostList_->at(i)->routeTo(hostList_->at(j), route, nullptr);
 
           for (auto const& link : route)
-            model->getMaxminSystem()->expand_add(link->constraint(), this->get_variable(),
-                                                 bytes_amount[i * host_nb + j]);
+            model->get_maxmin_system()->expand_add(link->constraint(), this->get_variable(),
+                                                   bytes_amount[i * host_nb + j]);
         }
       }
     }
@@ -240,7 +240,7 @@ LinkImpl* NetworkL07Model::createLink(const std::string& name, double bandwidth,
  ************/
 
 CpuL07::CpuL07(CpuL07Model* model, simgrid::s4u::Host* host, std::vector<double>* speedPerPstate, int core)
-    : Cpu(model, host, model->getMaxminSystem()->constraint_new(this, speedPerPstate->front()), speedPerPstate, core)
+    : Cpu(model, host, model->get_maxmin_system()->constraint_new(this, speedPerPstate->front()), speedPerPstate, core)
 {
 }
 
@@ -248,7 +248,7 @@ CpuL07::~CpuL07()=default;
 
 LinkL07::LinkL07(NetworkL07Model* model, const std::string& name, double bandwidth, double latency,
                  e_surf_link_sharing_policy_t policy)
-    : LinkImpl(model, name, model->getMaxminSystem()->constraint_new(this, bandwidth))
+    : LinkImpl(model, name, model->get_maxmin_system()->constraint_new(this, bandwidth))
 {
   bandwidth_.peak = bandwidth;
   latency_.peak   = latency;
@@ -275,13 +275,13 @@ kernel::resource::Action* CpuL07::sleep(double duration)
   L07Action *action = static_cast<L07Action*>(execution_start(1.0));
   action->set_max_duration(duration);
   action->suspended_ = kernel::resource::Action::SuspendStates::sleeping;
-  model()->getMaxminSystem()->update_variable_weight(action->get_variable(), 0.0);
+  model()->get_maxmin_system()->update_variable_weight(action->get_variable(), 0.0);
 
   return action;
 }
 
 bool CpuL07::isUsed(){
-  return model()->getMaxminSystem()->constraint_used(constraint());
+  return model()->get_maxmin_system()->constraint_used(constraint());
 }
 
 /** @brief take into account changes of speed (either load or max) */
@@ -289,11 +289,11 @@ void CpuL07::onSpeedChange() {
   kernel::lmm::Variable* var = nullptr;
   const_lmm_element_t elem = nullptr;
 
-  model()->getMaxminSystem()->update_constraint_bound(constraint(), speed_.peak * speed_.scale);
+  model()->get_maxmin_system()->update_constraint_bound(constraint(), speed_.peak * speed_.scale);
   while ((var = constraint()->get_variable(&elem))) {
     kernel::resource::Action* action = static_cast<kernel::resource::Action*>(var->get_id());
 
-    model()->getMaxminSystem()->update_variable_bound(action->get_variable(), speed_.scale * speed_.peak);
+    model()->get_maxmin_system()->update_variable_bound(action->get_variable(), speed_.scale * speed_.peak);
   }
 
   Cpu::onSpeedChange();
@@ -301,7 +301,7 @@ void CpuL07::onSpeedChange() {
 
 
 bool LinkL07::isUsed(){
-  return model()->getMaxminSystem()->constraint_used(constraint());
+  return model()->get_maxmin_system()->constraint_used(constraint());
 }
 
 void CpuL07::apply_event(tmgr_trace_event_t triggered, double value)
@@ -350,7 +350,7 @@ void LinkL07::apply_event(tmgr_trace_event_t triggered, double value)
 void LinkL07::setBandwidth(double value)
 {
   bandwidth_.peak = value;
-  model()->getMaxminSystem()->update_constraint_bound(constraint(), bandwidth_.peak * bandwidth_.scale);
+  model()->get_maxmin_system()->update_constraint_bound(constraint(), bandwidth_.peak * bandwidth_.scale);
 }
 
 void LinkL07::setLatency(double value)
@@ -401,9 +401,9 @@ void L07Action::updateBound()
   XBT_DEBUG("action (%p) : lat_bound = %g", this, lat_bound);
   if ((latency_ <= 0.0) && (suspended_ == Action::SuspendStates::not_suspended)) {
     if (rate_ < 0)
-      get_model()->getMaxminSystem()->update_variable_bound(get_variable(), lat_bound);
+      get_model()->get_maxmin_system()->update_variable_bound(get_variable(), lat_bound);
     else
-      get_model()->getMaxminSystem()->update_variable_bound(get_variable(), std::min(rate_, lat_bound));
+      get_model()->get_maxmin_system()->update_variable_bound(get_variable(), std::min(rate_, lat_bound));
   }
 }
 
index 03d43d2..40f54e6 100644 (file)
@@ -38,8 +38,8 @@ public:
   HostL07Model();
   ~HostL07Model();
 
-  double nextOccuringEvent(double now) override;
-  void updateActionsState(double now, double delta) override;
+  double next_occuring_event(double now) override;
+  void update_actions_state(double now, double delta) override;
   kernel::resource::Action* executeParallelTask(int host_nb, sg_host_t* host_list, double* flops_amount,
                                                 double* bytes_amount, double rate) override;
 };
index 2e3c492..9a7e82c 100644 (file)
@@ -70,14 +70,14 @@ StorageImpl* StorageN11Model::createStorage(std::string id, std::string type_id,
   return storage;
 }
 
-double StorageN11Model::nextOccuringEvent(double now)
+double StorageN11Model::next_occuring_event(double now)
 {
-  return StorageModel::nextOccuringEventFull(now);
+  return StorageModel::next_occuring_event_full(now);
 }
 
-void StorageN11Model::updateActionsState(double /*now*/, double delta)
+void StorageN11Model::update_actions_state(double /*now*/, double delta)
 {
-  for (auto it = std::begin(*getRunningActionSet()); it != std::end(*getRunningActionSet());) {
+  for (auto it = std::begin(*get_running_action_set()); it != std::end(*get_running_action_set());) {
     StorageAction& action = static_cast<StorageAction&>(*it);
     ++it; // increment iterator here since the following calls to action.finish() may invalidate it
     action.update_remains(lrint(action.get_variable()->get_value() * delta));
@@ -120,18 +120,18 @@ StorageAction* StorageN11::write(sg_size_t size)
 
 StorageN11Action::StorageN11Action(kernel::resource::Model* model, double cost, bool failed, StorageImpl* storage,
                                    e_surf_action_storage_type_t type)
-    : StorageAction(model, cost, failed, model->getMaxminSystem()->variable_new(this, 1.0, -1.0, 3), storage, type)
+    : StorageAction(model, cost, failed, model->get_maxmin_system()->variable_new(this, 1.0, -1.0, 3), storage, type)
 {
   XBT_IN("(%s,%g", storage->getCname(), cost);
 
   // Must be less than the max bandwidth for all actions
-  model->getMaxminSystem()->expand(storage->constraint(), get_variable(), 1.0);
+  model->get_maxmin_system()->expand(storage->constraint(), get_variable(), 1.0);
   switch(type) {
   case READ:
-    model->getMaxminSystem()->expand(storage->constraintRead_, get_variable(), 1.0);
+    model->get_maxmin_system()->expand(storage->constraintRead_, get_variable(), 1.0);
     break;
   case WRITE:
-    model->getMaxminSystem()->expand(storage->constraintWrite_, get_variable(), 1.0);
+    model->get_maxmin_system()->expand(storage->constraintWrite_, get_variable(), 1.0);
     break;
   default:
     THROW_UNIMPLEMENTED;
@@ -148,7 +148,7 @@ void StorageN11Action::suspend()
 {
   XBT_IN("(%p)", this);
   if (suspended_ != Action::SuspendStates::sleeping) {
-    get_model()->getMaxminSystem()->update_variable_weight(get_variable(), 0.0);
+    get_model()->get_maxmin_system()->update_variable_weight(get_variable(), 0.0);
     suspended_ = Action::SuspendStates::suspended;
   }
   XBT_OUT();
index dfcd33e..617b285 100644 (file)
@@ -29,8 +29,8 @@ class StorageN11Model : public StorageModel {
 public:
   StorageImpl* createStorage(std::string id, std::string type_id, std::string content_name,
                              std::string attach) override;
-  double nextOccuringEvent(double now) override;
-  void updateActionsState(double now, double delta) override;
+  double next_occuring_event(double now) override;
+  void update_actions_state(double now, double delta) override;
 };
 
 /************
index 99354ad..968e024 100644 (file)
@@ -36,7 +36,7 @@ void surf_presolve()
 
   XBT_DEBUG ("Set every models in the right state by updating them to 0.");
   for (auto const& model : *all_existing_models)
-    model->updateActionsState(NOW, 0.0);
+    model->update_actions_state(NOW, 0.0);
 }
 
 double surf_solve(double max_date)
@@ -55,13 +55,13 @@ double surf_solve(double max_date)
 
   /* Physical models MUST be resolved first */
   XBT_DEBUG("Looking for next event in physical models");
-  double next_event_phy = surf_host_model->nextOccuringEvent(NOW);
+  double next_event_phy = surf_host_model->next_occuring_event(NOW);
   if ((time_delta < 0.0 || next_event_phy < time_delta) && next_event_phy >= 0.0) {
     time_delta = next_event_phy;
   }
   if (surf_vm_model != nullptr) {
     XBT_DEBUG("Looking for next event in virtual models");
-    double next_event_virt = surf_vm_model->nextOccuringEvent(NOW);
+    double next_event_virt = surf_vm_model->next_occuring_event(NOW);
     if ((time_delta < 0.0 || next_event_virt < time_delta) && next_event_virt >= 0.0)
       time_delta = next_event_virt;
   }
@@ -69,7 +69,7 @@ double surf_solve(double max_date)
   for (auto const& model : *all_existing_models) {
     if (model != surf_host_model && model != surf_vm_model && model != surf_network_model &&
         model != surf_storage_model) {
-      double next_event_model = model->nextOccuringEvent(NOW);
+      double next_event_model = model->next_occuring_event(NOW);
       if ((time_delta < 0.0 || next_event_model < time_delta) && next_event_model >= 0.0)
         time_delta = next_event_model;
     }
@@ -92,7 +92,7 @@ double surf_solve(double max_date)
 
       XBT_DEBUG("Run the NS3 network at most %fs", time_delta);
       // run until min or next flow
-      model_next_action_end = surf_network_model->nextOccuringEvent(time_delta);
+      model_next_action_end = surf_network_model->next_occuring_event(time_delta);
 
       XBT_DEBUG("Min for network : %f", model_next_action_end);
       if (model_next_action_end >= 0.0)
@@ -138,7 +138,7 @@ double surf_solve(double max_date)
 
   // Inform the models of the date change
   for (auto const& model : *all_existing_models)
-    model->updateActionsState(NOW, time_delta);
+    model->update_actions_state(NOW, time_delta);
 
   simgrid::s4u::onTimeAdvance(time_delta);
 
@@ -161,17 +161,17 @@ static simgrid::kernel::resource::Action* ActionListExtract(simgrid::kernel::res
 
 simgrid::kernel::resource::Action* surf_model_extract_done_action_set(simgrid::kernel::resource::Model* model)
 {
-  return ActionListExtract(model->getDoneActionSet());
+  return ActionListExtract(model->get_done_action_set());
 }
 
 simgrid::kernel::resource::Action* surf_model_extract_failed_action_set(simgrid::kernel::resource::Model* model)
 {
-  return ActionListExtract(model->getFailedActionSet());
+  return ActionListExtract(model->get_failed_action_set());
 }
 
 int surf_model_running_action_set_size(simgrid::kernel::resource::Model* model)
 {
-  return model->getRunningActionSet()->size();
+  return model->get_running_action_set()->size();
 }
 
 void surf_cpu_action_set_bound(simgrid::kernel::resource::Action* action, double bound)
index aca6551..412fe5a 100644 (file)
@@ -66,7 +66,7 @@ int main(int argc, char **argv)
     XBT_INFO("Next Event : %g", surf_get_clock());
     XBT_DEBUG("\t CPU actions");
 
-    simgrid::kernel::resource::Action::StateSet* action_list = surf_cpu_model_pm->getFailedActionSet();
+    simgrid::kernel::resource::Action::StateSet* action_list = surf_cpu_model_pm->get_failed_action_set();
     while (not action_list->empty()) {
       simgrid::kernel::resource::Action& action = action_list->front();
       XBT_INFO("   CPU Failed action");
@@ -74,7 +74,7 @@ int main(int argc, char **argv)
       action.unref();
     }
 
-    action_list = surf_cpu_model_pm->getDoneActionSet();
+    action_list = surf_cpu_model_pm->get_done_action_set();
     while (not action_list->empty()) {
       simgrid::kernel::resource::Action& action = action_list->front();
       XBT_INFO("   CPU Done action");
@@ -82,7 +82,7 @@ int main(int argc, char **argv)
       action.unref();
     }
 
-    action_list = surf_network_model->getFailedActionSet();
+    action_list = surf_network_model->get_failed_action_set();
     while (not action_list->empty()) {
       simgrid::kernel::resource::Action& action = action_list->front();
       XBT_INFO("   Network Failed action");
@@ -90,7 +90,7 @@ int main(int argc, char **argv)
       action.unref();
     }
 
-    action_list = surf_network_model->getDoneActionSet();
+    action_list = surf_network_model->get_done_action_set();
     while (not action_list->empty()) {
       simgrid::kernel::resource::Action& action = action_list->front();
       XBT_INFO("   Network Done action");
@@ -98,8 +98,9 @@ int main(int argc, char **argv)
       action.unref();
     }
 
-  } while ((surf_network_model->getRunningActionSet()->size() ||
-           surf_cpu_model_pm->getRunningActionSet()->size()) && surf_solve(-1.0) >= 0.0);
+  } while (
+      (surf_network_model->get_running_action_set()->size() || surf_cpu_model_pm->get_running_action_set()->size()) &&
+      surf_solve(-1.0) >= 0.0);
 
   XBT_DEBUG("Simulation Terminated");