static int action_free(surf_action_t action)
{
- action->using--;
- if (!action->using) {
+ action->refcount --;
+ if (!action->refcount ) {
xbt_swag_remove(action, action->state_set);
if (((surf_action_network_CM02_t) action)->variable)
lmm_variable_free(network_maxmin_system,
static void action_use(surf_action_t action)
{
- action->using++;
+ action->refcount ++;
}
static void action_cancel(surf_action_t action)
action = xbt_new0(s_surf_action_network_CM02_t, 1);
- action->generic_action.using = 1;
+ action->generic_action.refcount = 1;
action->generic_action.cost = size;
action->generic_action.remains = size;
action->generic_action.max_duration = NO_MAX_DURATION;
network_maxmin_system = lmm_system_new();
}
+/***************************************************************************/
+/* New TCP sharing model based on thesis experimantation and discussions. */
+/***************************************************************************/
+void surf_network_model_init_LegrandVelho(const char *filename)
+{
+ if (surf_network_model)
+ return;
+ surf_network_model_init_internal();
+ define_callbacks(filename);
+ xbt_dynar_push(model_list, &surf_network_model);
+ network_solve = lmm_solve;
+
+ update_model_description(surf_network_model_description,
+ "LegrandVelho",
+ (surf_model_t) surf_network_model);
+ INFO0("LegrandVelho Model was chosen!!");
+}
+
/***************************************************************************/
/* The nice TCP sharing model designed by Loris Marchal and Henri Casanova */
/***************************************************************************/