-static void model_init_internal(void)
-{
- s_surf_action_t action;
-
- surf_workstation_model = xbt_new0(s_surf_workstation_model_t, 1);
-
- surf_workstation_model->common_private =
- xbt_new0(s_surf_model_private_t, 1);
- surf_workstation_model->common_public =
- xbt_new0(s_surf_model_public_t, 1);
- surf_workstation_model->extension_public =
- xbt_new0(s_surf_workstation_model_extension_public_t, 1);
-
- surf_workstation_model->common_public->states.ready_action_set =
- xbt_swag_new(xbt_swag_offset(action, state_hookup));
- surf_workstation_model->common_public->states.running_action_set =
- xbt_swag_new(xbt_swag_offset(action, state_hookup));
- surf_workstation_model->common_public->states.failed_action_set =
- xbt_swag_new(xbt_swag_offset(action, state_hookup));
- surf_workstation_model->common_public->states.done_action_set =
- xbt_swag_new(xbt_swag_offset(action, state_hookup));
-
- surf_workstation_model->common_public->name_service = name_service;
- surf_workstation_model->common_public->get_resource_name =
- get_resource_name;
- surf_workstation_model->common_public->action_get_state =
- surf_action_get_state;
- surf_workstation_model->common_public->action_get_start_time =
- surf_action_get_start_time;
- surf_workstation_model->common_public->action_get_finish_time =
- surf_action_get_finish_time;
- surf_workstation_model->common_public->action_use = action_use;
- surf_workstation_model->common_public->action_free = action_free;
- surf_workstation_model->common_public->action_cancel = action_cancel;
- surf_workstation_model->common_public->action_recycle =
- action_recycle;
- surf_workstation_model->common_public->action_change_state =
- surf_action_change_state;
- surf_workstation_model->common_public->action_set_data =
- surf_action_set_data;
- surf_workstation_model->common_public->suspend = action_suspend;
- surf_workstation_model->common_public->resume = action_resume;
- surf_workstation_model->common_public->is_suspended =
- action_is_suspended;
- surf_workstation_model->common_public->set_max_duration =
- action_set_max_duration;
- surf_workstation_model->common_public->set_priority =
- action_set_priority;
- surf_workstation_model->common_public->name = "Workstation ptask_L07";
-
- surf_workstation_model->common_private->resource_used = resource_used;
- surf_workstation_model->common_private->share_resources =
- share_resources;
- surf_workstation_model->common_private->update_actions_state =
- update_actions_state;
- surf_workstation_model->common_private->update_resource_state =
- update_resource_state;
- surf_workstation_model->common_private->finalize = finalize;
-
- surf_workstation_model->extension_public->execute = execute;
- surf_workstation_model->extension_public->sleep = action_sleep;
- surf_workstation_model->extension_public->get_state =
- resource_get_state;
- surf_workstation_model->extension_public->get_speed = get_speed;
- surf_workstation_model->extension_public->get_available_speed =
- get_available_speed;
- surf_workstation_model->extension_public->communicate = communicate;
- surf_workstation_model->extension_public->execute_parallel_task =
- execute_parallel_task;
- surf_workstation_model->extension_public->get_route = get_route;
- surf_workstation_model->extension_public->get_route_size =
- get_route_size;
- surf_workstation_model->extension_public->get_link_name =
- get_link_name;
- surf_workstation_model->extension_public->get_link_bandwidth =
- get_link_bandwidth;
- surf_workstation_model->extension_public->get_link_latency =
- get_link_latency;
-
- workstation_set = xbt_dict_new();
- network_link_set = xbt_dict_new();
+static void ptask_model_init_internal(void)
+{
+ surf_workstation_model = surf_model_init();
+
+ surf_workstation_model->action_unref = ptask_action_unref;
+ surf_workstation_model->action_cancel = ptask_action_cancel;
+ surf_workstation_model->action_state_set = surf_action_state_set;
+ surf_workstation_model->suspend = ptask_action_suspend;
+ surf_workstation_model->resume = ptask_action_resume;
+ surf_workstation_model->is_suspended = ptask_action_is_suspended;
+ surf_workstation_model->set_max_duration = ptask_action_set_max_duration;
+ surf_workstation_model->set_priority = ptask_action_set_priority;
+ surf_workstation_model->get_remains = ptask_action_get_remains;
+ surf_workstation_model->name = "Workstation ptask_L07";
+
+ surf_workstation_model->model_private->resource_used =
+ ptask_resource_used;
+ surf_workstation_model->model_private->share_resources =
+ ptask_share_resources;
+ surf_workstation_model->model_private->update_actions_state =
+ ptask_update_actions_state;
+ surf_workstation_model->model_private->update_resource_state =
+ ptask_update_resource_state;
+ surf_workstation_model->model_private->finalize = ptask_finalize;
+
+
+ surf_workstation_model->extension.workstation.execute = ptask_execute;
+ surf_workstation_model->extension.workstation.sleep = ptask_action_sleep;
+ surf_workstation_model->extension.workstation.get_state =
+ ptask_resource_get_state;
+ surf_workstation_model->extension.workstation.get_speed =
+ ptask_get_speed;
+ surf_workstation_model->extension.workstation.get_available_speed =
+ ptask_get_available_speed;
+ surf_workstation_model->extension.workstation.communicate =
+ ptask_communicate;
+ surf_workstation_model->extension.workstation.get_route =
+ ptask_get_route;
+ surf_workstation_model->extension.workstation.execute_parallel_task =
+ ptask_execute_parallel_task;
+ surf_workstation_model->extension.workstation.get_link_bandwidth =
+ ptask_get_link_bandwidth;
+ surf_workstation_model->extension.workstation.get_link_latency =
+ ptask_get_link_latency;
+ surf_workstation_model->extension.workstation.link_shared =
+ ptask_link_shared;
+ surf_workstation_model->extension.workstation.get_properties =
+ surf_resource_properties;
+ surf_workstation_model->extension.workstation.link_create_resource =
+ ptask_link_create_resource;
+ surf_workstation_model->extension.workstation.cpu_create_resource =
+ ptask_cpu_create_resource;
+ surf_workstation_model->extension.workstation.add_traces =
+ ptask_add_traces;