xbt_dynar_foreach(model_list_invoke, iter, model) {
double next_action_end = -1.0;
xbt_dynar_foreach(model_list_invoke, iter, model) {
double next_action_end = -1.0;
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);
}
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;
- }
-
- unsigned i;
- for (i = 0; i < xbt_dynar_length(model_list_invoke); i++) {
- if ((surf_min < 0.0 || surf_mins[i] < surf_min)
- && surf_mins[i] >= 0.0) {
- surf_min = surf_mins[i];
- }
+ if ((surf_min < 0.0 || next_action_end < surf_min)
+ && next_action_end >= 0.0) {
+ surf_min = next_action_end;
+ }