-static void surf_share_resources(surf_model_t model)
-{
- double next_action_end = -1.0;
- int i = __sync_fetch_and_add(&surf_min_index, 1);
- if (strcmp(model->getName(), "network NS3")) {
- XBT_DEBUG("Running for Resource [%s]", model->getName());
- next_action_end = model->shareResources(NOW);
- XBT_DEBUG("Resource [%s] : next action end = %f",
- model->getName(), next_action_end);
- }
- surf_mins[i] = next_action_end;
-}
-
-static void surf_update_actions_state(surf_model_t model)
-{
- model->updateActionsState(NOW, surf_min);
+ XBT_DEBUG ("Set every models in the right state by updating them to 0.");
+ xbt_dynar_foreach(all_existing_models, iter, model)
+ model->updateActionsState(NOW, 0.0);