Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
code factorization
[simgrid.git] / src / surf / surf_interface.cpp
index c9c10d8..f49641e 100644 (file)
@@ -194,9 +194,6 @@ static xbt_parmap_t surf_parmap = NULL; /* parallel map on models */
 #endif
 
 double NOW = 0;
-double *surf_mins = NULL; /* return value of share_resources for each model */
-int surf_min_index;       /* current index in surf_mins */
-double surf_min;               /* duration determined by surf_solve */
 
 double surf_get_clock(void)
 {
@@ -427,9 +424,6 @@ void surf_exit(void)
   xbt_parmap_destroy(surf_parmap);
 #endif
 
-  xbt_free(surf_mins);
-  surf_mins = NULL;
-
   tmgr_finalize();
   surf_parse_lex_destroy();
   surf_parse_free_callbacks();
@@ -441,9 +435,8 @@ void surf_exit(void)
  * Model *
  *********/
 
-Model::Model(const char *name)
+Model::Model()
   : p_maxminSystem(NULL)
-  , p_name(name)
 {
   p_readyActionSet = new ActionList();
   p_runningActionSet = new ActionList();
@@ -726,7 +719,6 @@ void Action::initialize(Model *model, double cost, bool failed,
   m_remains = cost;
   m_maxDuration = NO_MAX_DURATION;
   m_finish = -1.0;
-  m_failed = failed;
   m_start = surf_get_clock();
   m_cost = cost;
   p_model = model;
@@ -736,11 +728,6 @@ void Action::initialize(Model *model, double cost, bool failed,
   m_lastUpdate = 0;
   m_suspended = false;
   m_hat = NOTSET;
-}
-
-Action::Action(Model *model, double cost, bool failed)
-{
-  initialize(model, cost, failed);
   p_category = NULL;
   p_stateHookup.prev = 0;
   p_stateHookup.next = 0;
@@ -752,18 +739,14 @@ Action::Action(Model *model, double cost, bool failed)
   p_stateSet->push_back(*this);
 }
 
+Action::Action(Model *model, double cost, bool failed)
+{
+  initialize(model, cost, failed);
+}
+
 Action::Action(Model *model, double cost, bool failed, lmm_variable_t var)
 {
   initialize(model, cost, failed, var);
-  p_category = NULL;
-  p_stateHookup.prev = 0;
-  p_stateHookup.next = 0;
-  if (failed)
-    p_stateSet = getModel()->getFailedActionSet();
-  else
-    p_stateSet = getModel()->getRunningActionSet();
-
-  p_stateSet->push_back(*this);
 }
 
 Action::~Action() {