surf_action_t commAB = NULL;
double now = -1.0;
- surf_workstation_model_init_CLM03(platform);
+ int workstation_id =
+ find_model_description(surf_workstation_model_description,
+ surf_workstation_model_description_size,
+ "CLM03");
+
+ surf_workstation_model_description[workstation_id].model_init(platform);
+ parse_platform_file(platform);
+ if (surf_workstation_model_description[workstation_id].create_ws)
+ surf_workstation_model_description[workstation_id].create_ws();
/*********************** WORKSTATION ***********************************/
workstationA =
/* Let's check that those two processors exist */
DEBUG2("%s : %p\n",
surf_workstation_model->common_public->
- get_model_name(workstationA), workstationA);
+ get_resource_name(workstationA), workstationA);
DEBUG2("%s : %p\n",
surf_workstation_model->common_public->
- get_model_name(workstationB), workstationB);
+ get_resource_name(workstationB), workstationB);
/* Let's do something on it */
actionA =
surf_solve(); /* Takes traces into account. Returns 0.0 */
do {
surf_action_t action = NULL;
- int i;
+ unsigned int iter;
surf_model_t model = NULL;
now = surf_get_clock();
DEBUG1("Next Event : " "%g" "\n", now);
- xbt_dynar_foreach(model_list, i, model) {
+ xbt_dynar_foreach(model_list, iter, model) {
DEBUG1("\t %s actions\n", model->common_public->name);
while ((action =
xbt_swag_extract(model->common_public->states.