name_list);
}
-double generic_maxmin_share_models(xbt_swag_t running_actions,
- size_t offset)
-{
- return generic_maxmin_share_models2(running_actions, offset,
- maxmin_system, lmm_solve);
-}
-
-double generic_maxmin_share_models2(xbt_swag_t running_actions,
- size_t offset,
- lmm_system_t sys,
- void (*solve) (lmm_system_t))
+double generic_maxmin_share_resources(xbt_swag_t running_actions,
+ size_t offset,
+ lmm_system_t sys,
+ void (*solve) (lmm_system_t))
{
surf_action_t action = NULL;
double min = -1;
model_list = xbt_dynar_new(sizeof(surf_model_private_t), NULL);
if (!history)
history = tmgr_history_new();
- if (!maxmin_system)
- maxmin_system = lmm_system_new();
}
static char *path_name = NULL;
int i;
char *path = NULL;
FILE *file = NULL;
- int path_name_len = 0; /* don't count '\0' */
+ unsigned int path_name_len = 0; /* don't count '\0' */
xbt_assert0(name, "Need a non-NULL file name");
free(path_name);
path_name = NULL;
}
+ NOW=0; /* Just in case the user plans to restart the simulation afterward */
xbt_exit();
}
&value,
(void **) &model_obj))) {
model_obj->model->common_private->
- update_model_state(model_obj, event, value);
+ update_resource_state(model_obj, event, value);
}
}
xbt_dynar_foreach(model_list, i, model) {
xbt_dynar_foreach(model_list, i, model) {
DEBUG1("Running for Resource [%s]", model->common_public->name);
model_next_action_end =
- model->common_private->share_models(NOW);
+ model->common_private->share_resources(NOW);
DEBUG2("Resource [%s] : next action end = %f",
model->common_public->name, model_next_action_end);
if (((min < 0.0) || (model_next_action_end < min))
&value,
(void **) &model_obj))) {
if (model_obj->model->common_private->
- model_used(model_obj)) {
+ resource_used(model_obj)) {
min = next_event_date - NOW;
DEBUG1
("This event will modify model state. Next event set to %f",
/* update state of model_obj according to new value. Does not touch lmm.
It will be modified if needed when updating actions */
model_obj->model->common_private->
- update_model_state(model_obj, event, value);
+ update_resource_state(model_obj, event, value);
}
}