Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Remove XBT_INFO call
[simgrid.git] / src / surf / workstation_ptask_L07.cpp
index 71d2a57..f44c1a1 100644 (file)
@@ -502,11 +502,20 @@ void CpuL07::updateState(tmgr_trace_event_t event_type, double value, double /*d
 void LinkL07::updateState(tmgr_trace_event_t event_type, double value, double date){
   XBT_DEBUG("Updating link %s (%p) with value=%f for date=%g", getName(), this, value, date);
   if (event_type == p_bwEvent) {
-    updateBandwidth(value, date);
+    m_bwCurrent = value;
+    lmm_update_constraint_bound(ptask_maxmin_system, getConstraint(), m_bwCurrent);
     if (tmgr_trace_event_free(event_type))
       p_bwEvent = NULL;
   } else if (event_type == p_latEvent) {
-    updateLatency(value, date);
+    lmm_variable_t var = NULL;
+    WorkstationL07ActionPtr action;
+    lmm_element_t elem = NULL;
+
+    m_latCurrent = value;
+    while ((var = lmm_get_var_from_cnst(ptask_maxmin_system, getConstraint(), &elem))) {
+      action = (WorkstationL07ActionPtr) lmm_variable_id(var);
+      action->updateBound();
+    }
     if (tmgr_trace_event_free(event_type))
       p_latEvent = NULL;
   } else if (event_type == p_stateEvent) {
@@ -573,31 +582,11 @@ double LinkL07::getBandwidth()
   return m_bwCurrent;
 }
 
-void LinkL07::updateBandwidth(double value, double date)
-{
-  m_bwCurrent = value;
-  lmm_update_constraint_bound(ptask_maxmin_system, getConstraint(), m_bwCurrent);
-}
-
 double LinkL07::getLatency()
 {
   return m_latCurrent;
 }
 
-void LinkL07::updateLatency(double value, double date)
-{
-  lmm_variable_t var = NULL;
-  WorkstationL07ActionPtr action;
-  lmm_element_t elem = NULL;
-
-  m_latCurrent = value;
-  while ((var = lmm_get_var_from_cnst(ptask_maxmin_system, getConstraint(), &elem))) {
-    action = (WorkstationL07ActionPtr) lmm_variable_id(var);
-    action->updateBound();
-  }
-}
-
-
 bool LinkL07::isShared()
 {
   return lmm_constraint_is_shared(getConstraint());