SD_CHECK_INIT_DONE();
xbt_assert0(SD_workstation_get_number() > 0, "There is no workstation!");
-
-
if (sd_global->workstation_list == NULL) { /* this is the first time the function is called */
sd_global->workstation_list =
xbt_new(SD_workstation_t, sd_global->workstation_count);
sd_global->recyclable_route = xbt_new(SD_link_t, SD_link_get_number());
}
- surf_src = src->surf_workstation;
- surf_dst = dst->surf_workstation;
+ surf_src = &src->surf_workstation;
+ surf_dst = &dst->surf_workstation;
- surf_route =
- surf_workstation_model->extension.workstation.get_route(surf_src,
- surf_dst);
+ surf_route = surf_workstation_model->extension.workstation.get_route(surf_src,surf_dst);
+
+ if(surf_route == NULL)
+ {
+ INFO0("PBLM1 surf_route == NULL");
+ }
xbt_dynar_foreach(surf_route, cpt, surf_link) {
link_name = surf_resource_name(surf_link);
sd_global->recyclable_route[cpt] =
xbt_dict_get(sd_global->links, link_name);
}
-
+ INFO0("FIN");
return sd_global->recyclable_route;
}
const SD_workstation_t *workstations;
SD_workstation_t w1;
SD_workstation_t w2;
- const char *name1;
- const char *name2;
+ const char *name1 = NULL;
+ const char *name2 = NULL;
const double computation_amount1 = 2000000;
const double computation_amount2 = 1000000;
const double communication_amount12 = 2000000;
/* test the estimation functions (use small_platform.xml) */
workstations = SD_workstation_get_list();
+
+
+ for(i=0 ; i < SD_workstation_get_number() ; i++)
+ {
+ INFO1("name : %s",SD_workstation_get_name(workstations[i]) );
+ }
+
w1 = workstations[0];
w2 = workstations[1];
name1 = SD_workstation_get_name(w1);
name2 = SD_workstation_get_name(w2);
+
route = SD_route_get_list(w1, w2);
+
route_size = SD_route_get_size(w1, w2);
+
taskA = SD_task_create("Task A", NULL, 10.0);
taskB = SD_task_create("Task B", NULL, 40.0);
taskC = SD_task_create("Task C", NULL, 30.0);