Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Rename the fields of surf::Model
authorMartin Quinson <martin.quinson@loria.fr>
Tue, 8 Mar 2016 21:23:22 +0000 (22:23 +0100)
committerMartin Quinson <martin.quinson@loria.fr>
Tue, 8 Mar 2016 21:23:22 +0000 (22:23 +0100)
src/surf/cpu_cas01.cpp
src/surf/network_cm02.cpp
src/surf/network_ib.cpp
src/surf/network_interface.cpp
src/surf/network_interface.hpp
src/surf/ptask_L07.cpp
src/surf/storage_interface.cpp
src/surf/storage_n11.cpp
src/surf/surf_interface.cpp
src/surf/surf_interface.hpp

index 008a0c0..6a00daf 100644 (file)
@@ -42,11 +42,11 @@ CpuCas01Model::CpuCas01Model() : simgrid::surf::CpuModel()
   int select = xbt_cfg_get_boolean(_sg_cfg_set, "cpu/maxmin_selective_update");
 
   if (!strcmp(optim, "Full")) {
-    p_updateMechanism = UM_FULL;
-    m_selectiveUpdate = select;
+    updateMechanism_ = UM_FULL;
+    selectiveUpdate_ = select;
   } else if (!strcmp(optim, "Lazy")) {
-    p_updateMechanism = UM_LAZY;
-    m_selectiveUpdate = 1;
+    updateMechanism_ = UM_LAZY;
+    selectiveUpdate_ = 1;
     xbt_assert((select == 1)
                ||
                (xbt_cfg_is_default_value
@@ -58,24 +58,24 @@ CpuCas01Model::CpuCas01Model() : simgrid::surf::CpuModel()
 
   p_cpuRunningActionSetThatDoesNotNeedBeingChecked = new ActionList();
 
-  p_maxminSystem = lmm_system_new(m_selectiveUpdate);
+  maxminSystem_ = lmm_system_new(selectiveUpdate_);
 
   if (getUpdateMechanism() == UM_LAZY) {
-    p_actionHeap = xbt_heap_new(8, NULL);
-    xbt_heap_set_update_callback(p_actionHeap,  surf_action_lmm_update_index_heap);
-    p_modifiedSet = new ActionLmmList();
-    p_maxminSystem->keep_track = p_modifiedSet;
+    actionHeap_ = xbt_heap_new(8, NULL);
+    xbt_heap_set_update_callback(actionHeap_,  surf_action_lmm_update_index_heap);
+    modifiedSet_ = new ActionLmmList();
+    maxminSystem_->keep_track = modifiedSet_;
   }
 }
 
 CpuCas01Model::~CpuCas01Model()
 {
-  lmm_system_free(p_maxminSystem);
-  p_maxminSystem = NULL;
+  lmm_system_free(maxminSystem_);
+  maxminSystem_ = NULL;
 
-  if (p_actionHeap)
-    xbt_heap_free(p_actionHeap);
-  delete p_modifiedSet;
+  if (actionHeap_)
+    xbt_heap_free(actionHeap_);
+  delete modifiedSet_;
 
   surf_cpu_model_pm = NULL;
 
@@ -94,7 +94,7 @@ Cpu *CpuCas01Model::createCpu(simgrid::s4u::Host *host, xbt_dynar_t speedPeak,
 
 double CpuCas01Model::next_occuring_event_full(double /*now*/)
 {
-  return Model::shareResourcesMaxMin(getRunningActionSet(), p_maxminSystem, lmm_solve);
+  return Model::shareResourcesMaxMin(getRunningActionSet(), maxminSystem_, lmm_solve);
 }
 
 /************
index 1ea74f3..a9df4e7 100644 (file)
@@ -147,27 +147,27 @@ NetworkCm02Model::NetworkCm02Model()
   int select = xbt_cfg_get_boolean(_sg_cfg_set, "network/maxmin_selective_update");
 
   if (!strcmp(optim, "Full")) {
-    p_updateMechanism = UM_FULL;
-    m_selectiveUpdate = select;
+    updateMechanism_ = UM_FULL;
+    selectiveUpdate_ = select;
   } else if (!strcmp(optim, "Lazy")) {
-    p_updateMechanism = UM_LAZY;
-    m_selectiveUpdate = 1;
+    updateMechanism_ = UM_LAZY;
+    selectiveUpdate_ = 1;
     xbt_assert((select == 1) || (xbt_cfg_is_default_value(_sg_cfg_set, "network/maxmin_selective_update")),
                "Disabling selective update while using the lazy update mechanism is dumb!");
   } else {
     xbt_die("Unsupported optimization (%s) for this model", optim);
   }
 
-  if (!p_maxminSystem)
-    p_maxminSystem = lmm_system_new(m_selectiveUpdate);
+  if (!maxminSystem_)
+    maxminSystem_ = lmm_system_new(selectiveUpdate_);
 
   routing_model_create(createLink("__loopback__", 498000000, 0.000015, SURF_LINK_FATPIPE, NULL));
 
-  if (p_updateMechanism == UM_LAZY) {
-  p_actionHeap = xbt_heap_new(8, NULL);
-  xbt_heap_set_update_callback(p_actionHeap, surf_action_lmm_update_index_heap);
-  p_modifiedSet = new ActionLmmList();
-  p_maxminSystem->keep_track = p_modifiedSet;
+  if (updateMechanism_ == UM_LAZY) {
+  actionHeap_ = xbt_heap_new(8, NULL);
+  xbt_heap_set_update_callback(actionHeap_, surf_action_lmm_update_index_heap);
+  modifiedSet_ = new ActionLmmList();
+  maxminSystem_->keep_track = modifiedSet_;
   }
 }
 
@@ -175,7 +175,7 @@ Link* NetworkCm02Model::createLink(const char *name, double bandwidth, double la
 {
   xbt_assert(NULL == Link::byName(name), "Link '%s' declared several times in the platform", name);
 
-  Link* link = new NetworkCm02Link(this, name, properties, p_maxminSystem, sg_bandwidth_factor * bandwidth, bandwidth, latency, policy);
+  Link* link = new NetworkCm02Link(this, name, properties, maxminSystem_, sg_bandwidth_factor * bandwidth, bandwidth, latency, policy);
   Link::onCreation(link);
   return link;
 }
@@ -183,20 +183,20 @@ Link* NetworkCm02Model::createLink(const char *name, double bandwidth, double la
 void NetworkCm02Model::updateActionsStateLazy(double now, double /*delta*/)
 {
   NetworkCm02Action *action;
-  while ((xbt_heap_size(p_actionHeap) > 0)
-         && (double_equals(xbt_heap_maxkey(p_actionHeap), now, sg_surf_precision))) {
-    action = static_cast<NetworkCm02Action*> (xbt_heap_pop(p_actionHeap));
+  while ((xbt_heap_size(actionHeap_) > 0)
+         && (double_equals(xbt_heap_maxkey(actionHeap_), now, sg_surf_precision))) {
+    action = static_cast<NetworkCm02Action*> (xbt_heap_pop(actionHeap_));
     XBT_DEBUG("Something happened to action %p", action);
     if (TRACE_is_enabled()) {
-      int n = lmm_get_number_of_cnst_from_var(p_maxminSystem, action->getVariable());
+      int n = lmm_get_number_of_cnst_from_var(maxminSystem_, action->getVariable());
 
       for (int i = 0; i < n; i++){
-        lmm_constraint_t constraint = lmm_get_cnst_from_var(p_maxminSystem, action->getVariable(), i);
+        lmm_constraint_t constraint = lmm_get_cnst_from_var(maxminSystem_, action->getVariable(), i);
         NetworkCm02Link *link = static_cast<NetworkCm02Link*>(lmm_constraint_id(constraint));
         TRACE_surf_link_set_utilization(link->getName(),
                                         action->getCategory(),
                                         (lmm_variable_getvalue(action->getVariable())*
-                                            lmm_get_cnst_weight_from_var(p_maxminSystem,
+                                            lmm_get_cnst_weight_from_var(maxminSystem_,
                                                 action->getVariable(),
                                                 i)),
                                         action->getLastUpdate(),
@@ -207,8 +207,8 @@ void NetworkCm02Model::updateActionsStateLazy(double now, double /*delta*/)
     // if I am wearing a latency hat
     if (action->getHat() == LATENCY) {
       XBT_DEBUG("Latency paid for action %p. Activating", action);
-      lmm_update_variable_weight(p_maxminSystem, action->getVariable(), action->m_weight);
-      action->heapRemove(p_actionHeap);
+      lmm_update_variable_weight(maxminSystem_, action->getVariable(), action->m_weight);
+      action->heapRemove(actionHeap_);
       action->refreshLastUpdate();
 
         // if I am wearing a max_duration or normal hat
@@ -220,7 +220,7 @@ void NetworkCm02Model::updateActionsStateLazy(double now, double /*delta*/)
       action->setRemains(0);
       action->finish();
       action->setState(SURF_ACTION_DONE);
-      action->heapRemove(p_actionHeap);
+      action->heapRemove(actionHeap_);
 
       action->gapRemove();
     }
@@ -250,26 +250,26 @@ void NetworkCm02Model::updateActionsStateFull(double now, double delta)
           action->m_latency = 0.0;
         }
         if (action->m_latency == 0.0 && !(action->isSuspended()))
-          lmm_update_variable_weight(p_maxminSystem, action->getVariable(),
+          lmm_update_variable_weight(maxminSystem_, action->getVariable(),
               action->m_weight);
       }
       if (TRACE_is_enabled()) {
-        int n = lmm_get_number_of_cnst_from_var(p_maxminSystem, action->getVariable());
+        int n = lmm_get_number_of_cnst_from_var(maxminSystem_, action->getVariable());
         for (int i = 0; i < n; i++){
-          lmm_constraint_t constraint = lmm_get_cnst_from_var(p_maxminSystem, action->getVariable(), i);
+          lmm_constraint_t constraint = lmm_get_cnst_from_var(maxminSystem_, action->getVariable(), i);
 
           NetworkCm02Link* link = static_cast<NetworkCm02Link*>(lmm_constraint_id(constraint));
           TRACE_surf_link_set_utilization(link->getName(),
                                         action->getCategory(),
                                         (lmm_variable_getvalue(action->getVariable())*
-                                            lmm_get_cnst_weight_from_var(p_maxminSystem,
+                                            lmm_get_cnst_weight_from_var(maxminSystem_,
                                                 action->getVariable(),
                                                 i)),
                                         action->getLastUpdate(),
                                         now - action->getLastUpdate());
         }
       }
-      if (!lmm_get_number_of_cnst_from_var (p_maxminSystem, action->getVariable())) {
+      if (!lmm_get_number_of_cnst_from_var (maxminSystem_, action->getVariable())) {
         /* There is actually no link used, hence an infinite bandwidth.
          * This happens often when using models like vivaldi.
          * In such case, just make sure that the action completes immediately.
@@ -328,7 +328,7 @@ Action *NetworkCm02Model::communicate(NetCard *src, NetCard *dst, double size, d
   action->m_weight = action->m_latency = latency;
 
   action->m_rate = rate;
-  if (p_updateMechanism == UM_LAZY) {
+  if (updateMechanism_ == UM_LAZY) {
     action->m_indexHeap = -1;
     action->m_lastUpdate = surf_get_clock();
   }
@@ -359,28 +359,28 @@ Action *NetworkCm02Model::communicate(NetCard *src, NetCard *dst, double size, d
     constraints_per_variable += back_route->size();
 
   if (action->m_latency > 0) {
-    action->p_variable = lmm_variable_new(p_maxminSystem, action, 0.0, -1.0, constraints_per_variable);
-    if (p_updateMechanism == UM_LAZY) {
+    action->p_variable = lmm_variable_new(maxminSystem_, action, 0.0, -1.0, constraints_per_variable);
+    if (updateMechanism_ == UM_LAZY) {
       // add to the heap the event when the latency is payed
       XBT_DEBUG("Added action (%p) one latency event at date %f", action, action->m_latency + action->m_lastUpdate);
-      action->heapInsert(p_actionHeap, action->m_latency + action->m_lastUpdate, route->empty() ? NORMAL : LATENCY);
+      action->heapInsert(actionHeap_, action->m_latency + action->m_lastUpdate, route->empty() ? NORMAL : LATENCY);
     }
   } else
-    action->p_variable = lmm_variable_new(p_maxminSystem, action, 1.0, -1.0, constraints_per_variable);
+    action->p_variable = lmm_variable_new(maxminSystem_, action, 1.0, -1.0, constraints_per_variable);
 
   if (action->m_rate < 0) {
-    lmm_update_variable_bound(p_maxminSystem, action->getVariable(), (action->m_latCurrent > 0) ? sg_tcp_gamma / (2.0 * action->m_latCurrent) : -1.0);
+    lmm_update_variable_bound(maxminSystem_, action->getVariable(), (action->m_latCurrent > 0) ? sg_tcp_gamma / (2.0 * action->m_latCurrent) : -1.0);
   } else {
-    lmm_update_variable_bound(p_maxminSystem, action->getVariable(), (action->m_latCurrent > 0) ? std::min(action->m_rate, sg_tcp_gamma / (2.0 * action->m_latCurrent)) : action->m_rate);
+    lmm_update_variable_bound(maxminSystem_, action->getVariable(), (action->m_latCurrent > 0) ? std::min(action->m_rate, sg_tcp_gamma / (2.0 * action->m_latCurrent)) : action->m_rate);
   }
 
   for (auto link: *route)
-    lmm_expand(p_maxminSystem, link->getConstraint(), action->getVariable(), 1.0);
+    lmm_expand(maxminSystem_, link->getConstraint(), action->getVariable(), 1.0);
 
   if (sg_network_crosstraffic == 1) {
     XBT_DEBUG("Fullduplex active adding backward flow using 5%%");
     for (auto link : *back_route)
-      lmm_expand(p_maxminSystem, link->getConstraint(), action->getVariable(), .05);
+      lmm_expand(maxminSystem_, link->getConstraint(), action->getVariable(), .05);
      
     //Change concurrency_share here, if you want that cross-traffic is included in the SURF concurrency
     //(You would also have to change lmm_element_concurrency())
index 7b743d5..546ba35 100644 (file)
@@ -178,7 +178,7 @@ namespace simgrid {
 
         if (!double_equals(penalized_bw, rate_before_update, sg_surf_precision)){
           XBT_DEBUG("%d->%d action %p penalty updated : bw now %f, before %f , initial rate %f", root->id,(*it)->destination->id,(*it)->action,penalized_bw, (*it)->action->getBound(), (*it)->init_rate );
-          lmm_update_variable_bound(p_maxminSystem, (*it)->action->getVariable(), penalized_bw);
+          lmm_update_variable_bound(maxminSystem_, (*it)->action->getVariable(), penalized_bw);
         }else{
           XBT_DEBUG("%d->%d action %p penalty not updated : bw %f, initial rate %f", root->id,(*it)->destination->id,(*it)->action,penalized_bw, (*it)->init_rate );
         }
index 3c2bb7e..6b25825 100644 (file)
@@ -168,7 +168,7 @@ namespace simgrid {
       ActionList *runningActions = surf_network_model->getRunningActionSet();
       double minRes;
 
-      minRes = shareResourcesMaxMin(runningActions, surf_network_model->p_maxminSystem, surf_network_model->f_networkSolve);
+      minRes = shareResourcesMaxMin(runningActions, surf_network_model->maxminSystem_, surf_network_model->f_networkSolve);
 
       for(ActionList::iterator it(runningActions->begin()), itend(runningActions->end())
           ; it != itend ; ++it) {
index cb59af1..bbdd35d 100644 (file)
@@ -68,12 +68,11 @@ namespace simgrid {
 
       /** @brief Destructor */
       ~NetworkModel() {
-        if (p_maxminSystem)
-          lmm_system_free(p_maxminSystem);
-        if (p_actionHeap)
-          xbt_heap_free(p_actionHeap);
-        if (p_modifiedSet)
-          delete p_modifiedSet;
+        if (maxminSystem_)
+          lmm_system_free(maxminSystem_);
+        if (actionHeap_)
+          xbt_heap_free(actionHeap_);
+        delete modifiedSet_;
       }
 
       /**
index 1b5534d..408873c 100644 (file)
@@ -45,9 +45,9 @@ namespace simgrid {
 namespace surf {
 
 HostL07Model::HostL07Model() : HostModel() {
-  p_maxminSystem = lmm_system_new(1);
-  surf_network_model = new NetworkL07Model(this,p_maxminSystem);
-  surf_cpu_model_pm = new CpuL07Model(this,p_maxminSystem);
+  maxminSystem_ = lmm_system_new(1);
+  surf_network_model = new NetworkL07Model(this,maxminSystem_);
+  surf_cpu_model_pm = new CpuL07Model(this,maxminSystem_);
 
   routing_model_create(surf_network_model->createLink("__loopback__", 498000000, 0.000015, SURF_LINK_FATPIPE, NULL));
 }
@@ -61,23 +61,23 @@ CpuL07Model::CpuL07Model(HostL07Model *hmodel,lmm_system_t sys)
   : CpuModel()
   , p_hostModel(hmodel)
   {
-    p_maxminSystem = sys;
+    maxminSystem_ = sys;
   }
 CpuL07Model::~CpuL07Model() {
   surf_cpu_model_pm = NULL;
-  lmm_system_free(p_maxminSystem);
-  p_maxminSystem = NULL;
+  lmm_system_free(maxminSystem_);
+  maxminSystem_ = NULL;
 }
 NetworkL07Model::NetworkL07Model(HostL07Model *hmodel, lmm_system_t sys)
   : NetworkModel()
   , p_hostModel(hmodel)
   {
-    p_maxminSystem = sys;
+    maxminSystem_ = sys;
   }
 NetworkL07Model::~NetworkL07Model()
 {
   surf_network_model = NULL;
-  p_maxminSystem = NULL; // Avoid multi-free
+  maxminSystem_ = NULL; // Avoid multi-free
 }
 
 
@@ -87,7 +87,7 @@ double HostL07Model::next_occuring_event(double /*now*/)
 
   ActionList *running_actions = getRunningActionSet();
   double min = this->shareResourcesMaxMin(running_actions,
-                                              p_maxminSystem,
+                                              maxminSystem_,
                                               bottleneck_solve);
 
   for(ActionList::iterator it(running_actions->begin()), itend(running_actions->end())
@@ -129,7 +129,7 @@ void HostL07Model::updateActionsState(double /*now*/, double delta) {
       }
       if ((action->m_latency == 0.0) && (action->isSuspended() == 0)) {
         action->updateBound();
-        lmm_update_variable_weight(p_maxminSystem, action->getVariable(), 1.0);
+        lmm_update_variable_weight(maxminSystem_, action->getVariable(), 1.0);
       }
     }
     XBT_DEBUG("Action (%p) : remains (%g) updated by %g.",
@@ -160,7 +160,7 @@ void HostL07Model::updateActionsState(double /*now*/, double delta) {
       lmm_constraint_t cnst = NULL;
       int i = 0;
 
-      while ((cnst = lmm_get_cnst_from_var(p_maxminSystem, action->getVariable(), i++))) {
+      while ((cnst = lmm_get_cnst_from_var(maxminSystem_, action->getVariable(), i++))) {
         void *constraint_id = lmm_constraint_id(cnst);
 
         if (static_cast<HostImpl*>(constraint_id)->isOff()) {
index 026ed9a..61c105c 100644 (file)
@@ -43,7 +43,7 @@ StorageModel::StorageModel()
 }
 
 StorageModel::~StorageModel(){
-  lmm_system_free(p_maxminSystem);
+  lmm_system_free(maxminSystem_);
 
   surf_storage_model = NULL;
 
index 5eaa3ac..e647885 100644 (file)
@@ -70,8 +70,8 @@ StorageN11Model::StorageN11Model() : StorageModel() {
 
   storage_running_action_set_that_does_not_need_being_checked =
       xbt_swag_new(xbt_swag_offset(*action, p_stateHookup));
-  if (!p_maxminSystem) {
-    p_maxminSystem = lmm_system_new(storage_selective_update);
+  if (!maxminSystem_) {
+    maxminSystem_ = lmm_system_new(storage_selective_update);
   }
 }
 
@@ -99,7 +99,7 @@ Storage *StorageN11Model::createStorage(const char* id, const char* type_id,
   double Bconnection   = surf_parse_get_bandwidth((char*)xbt_dict_get(storage_type->model_properties, "Bconnection"),
       "property Bconnection, storage",type_id);
 
-  Storage *storage = new StorageN11(this, id, properties, p_maxminSystem,
+  Storage *storage = new StorageN11(this, id, properties, maxminSystem_,
       Bread, Bwrite, Bconnection, type_id, (char *)content_name,
       xbt_strdup(content_type), storage_type->size, (char *) attach);
   storageCreatedCallbacks(storage);
@@ -127,7 +127,7 @@ double StorageN11Model::next_occuring_event(double /*now*/)
   StorageAction *write_action;
 
   double min_completion = shareResourcesMaxMin(getRunningActionSet(),
-      p_maxminSystem, lmm_solve);
+      maxminSystem_, lmm_solve);
 
   double rate;
   // Foreach disk
index 2f785d0..7590c31 100644 (file)
@@ -360,32 +360,32 @@ namespace simgrid {
 namespace surf {
 
 Model::Model()
-  : p_maxminSystem(NULL)
+  : maxminSystem_(NULL)
 {
-  p_readyActionSet = new ActionList();
-  p_runningActionSet = new ActionList();
-  p_failedActionSet = new ActionList();
-  p_doneActionSet = new ActionList();
+  readyActionSet_ = new ActionList();
+  runningActionSet_ = new ActionList();
+  failedActionSet_ = new ActionList();
+  doneActionSet_ = new ActionList();
 
-  p_modifiedSet = NULL;
-  p_actionHeap = NULL;
-  p_updateMechanism = UM_UNDEFINED;
-  m_selectiveUpdate = 0;
+  modifiedSet_ = NULL;
+  actionHeap_ = NULL;
+  updateMechanism_ = UM_UNDEFINED;
+  selectiveUpdate_ = 0;
 }
 
 Model::~Model(){
-  delete p_readyActionSet;
-  delete p_runningActionSet;
-  delete p_failedActionSet;
-  delete p_doneActionSet;
+  delete readyActionSet_;
+  delete runningActionSet_;
+  delete failedActionSet_;
+  delete doneActionSet_;
 }
 
 double Model::next_occuring_event(double now)
 {
   //FIXME: set the good function once and for all
-  if (p_updateMechanism == UM_LAZY)
+  if (updateMechanism_ == UM_LAZY)
     return next_occuring_event_lazy(now);
-  else if (p_updateMechanism == UM_FULL)
+  else if (updateMechanism_ == UM_FULL)
     return next_occuring_event_full(now);
   else
     xbt_die("Invalid cpu update mechanism!");
@@ -399,20 +399,20 @@ double Model::next_occuring_event_lazy(double now)
 
   XBT_DEBUG
       ("Before share resources, the size of modified actions set is %zd",
-       p_modifiedSet->size());
+       modifiedSet_->size());
 
-  lmm_solve(p_maxminSystem);
+  lmm_solve(maxminSystem_);
 
   XBT_DEBUG
       ("After share resources, The size of modified actions set is %zd",
-       p_modifiedSet->size());
+       modifiedSet_->size());
 
-  while(!p_modifiedSet->empty()) {
-    action = &(p_modifiedSet->front());
-    p_modifiedSet->pop_front();
+  while(!modifiedSet_->empty()) {
+    action = &(modifiedSet_->front());
+    modifiedSet_->pop_front();
     int max_dur_flag = 0;
 
-    if (action->getStateSet() != p_runningActionSet)
+    if (action->getStateSet() != runningActionSet_)
       continue;
 
     /* bogus priority, skip it */
@@ -451,15 +451,15 @@ double Model::next_occuring_event_lazy(double now)
         action->getMaxDuration());
 
     if (min != -1) {
-      action->heapUpdate(p_actionHeap, min, max_dur_flag ? MAX_DURATION : NORMAL);
+      action->heapUpdate(actionHeap_, min, max_dur_flag ? MAX_DURATION : NORMAL);
       XBT_DEBUG("Insert at heap action(%p) min %f now %f", action, min,
                 now);
     } else DIE_IMPOSSIBLE;
   }
 
   //hereafter must have already the min value for this resource model
-  if (xbt_heap_size(p_actionHeap) > 0)
-    min = xbt_heap_maxkey(p_actionHeap) - now;
+  if (xbt_heap_size(actionHeap_) > 0)
+    min = xbt_heap_maxkey(actionHeap_) - now;
   else
     min = -1;
 
@@ -529,9 +529,9 @@ double Model::shareResourcesMaxMin(ActionList *running_actions,
 
 void Model::updateActionsState(double now, double delta)
 {
-  if (p_updateMechanism == UM_FULL)
+  if (updateMechanism_ == UM_FULL)
   updateActionsStateFull(now, delta);
-  else if (p_updateMechanism == UM_LAZY)
+  else if (updateMechanism_ == UM_LAZY)
   updateActionsStateLazy(now, delta);
   else
   xbt_die("Invalid cpu update mechanism!");
index 9cba1d1..6d98129 100644 (file)
@@ -274,31 +274,31 @@ public:
   virtual ~Model();
 
   /** @brief Get the set of [actions](@ref Action) in *ready* state */
-  virtual ActionList* getReadyActionSet() {return p_readyActionSet;}
+  virtual ActionList* getReadyActionSet() {return readyActionSet_;}
 
   /** @brief Get the set of [actions](@ref Action) in *running* state */
-  virtual ActionList* getRunningActionSet() {return p_runningActionSet;}
+  virtual ActionList* getRunningActionSet() {return runningActionSet_;}
 
   /** @brief Get the set of [actions](@ref Action) in *failed* state */
-  virtual ActionList* getFailedActionSet() {return p_failedActionSet;}
+  virtual ActionList* getFailedActionSet() {return failedActionSet_;}
 
   /** @brief Get the set of [actions](@ref Action) in *done* state */
-  virtual ActionList* getDoneActionSet() {return p_doneActionSet;}
+  virtual ActionList* getDoneActionSet() {return doneActionSet_;}
 
   /** @brief Get the set of modified [actions](@ref Action) */
-  virtual ActionLmmListPtr getModifiedSet() {return p_modifiedSet;}
+  virtual ActionLmmListPtr getModifiedSet() {return modifiedSet_;}
 
   /** @brief Get the maxmin system of the current Model */
-  lmm_system_t getMaxminSystem() {return p_maxminSystem;}
+  lmm_system_t getMaxminSystem() {return maxminSystem_;}
 
   /**
    * @brief Get the update mechanism of the current Model
    * @see e_UM_t
    */
-  e_UM_t getUpdateMechanism() {return p_updateMechanism;}
+  e_UM_t getUpdateMechanism() {return updateMechanism_;}
 
   /** @brief Get Action heap */
-  xbt_heap_t getActionHeap() {return p_actionHeap;}
+  xbt_heap_t getActionHeap() {return actionHeap_;}
 
   /**
    * @brief Share the resources between the actions
@@ -330,17 +330,17 @@ public:
   virtual bool next_occuring_event_isIdempotent()=0;
 
 protected:
-  ActionLmmListPtr p_modifiedSet;
-  lmm_system_t p_maxminSystem = nullptr;
-  e_UM_t p_updateMechanism = UM_UNDEFINED;
-  int m_selectiveUpdate;
-  xbt_heap_t p_actionHeap;
+  ActionLmmListPtr modifiedSet_;
+  lmm_system_t maxminSystem_ = nullptr;
+  e_UM_t updateMechanism_ = UM_UNDEFINED;
+  int selectiveUpdate_;
+  xbt_heap_t actionHeap_;
 
 private:
-  ActionList* p_readyActionSet; /**< Actions in state SURF_ACTION_READY */
-  ActionList* p_runningActionSet; /**< Actions in state SURF_ACTION_RUNNING */
-  ActionList* p_failedActionSet; /**< Actions in state SURF_ACTION_FAILED */
-  ActionList* p_doneActionSet; /**< Actions in state SURF_ACTION_DONE */
+  ActionList* readyActionSet_; /**< Actions in state SURF_ACTION_READY */
+  ActionList* runningActionSet_; /**< Actions in state SURF_ACTION_RUNNING */
+  ActionList* failedActionSet_; /**< Actions in state SURF_ACTION_FAILED */
+  ActionList* doneActionSet_; /**< Actions in state SURF_ACTION_DONE */
 };
 
 }