Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
add the floyd approach
[simgrid.git] / src / surf / surfxml_parse.c
index 0556aa7..8967099 100644 (file)
@@ -709,7 +709,6 @@ static void parse_host_foreach(void){
   const char *surfxml_host_availability_file = A_surfxml_host_availability_file;
   const char *surfxml_host_state_file = A_surfxml_host_state_file;
 
-
   xbt_dict_t cluster_host_props = current_property_set;
 
   names = xbt_dict_get_or_null(set_list, foreach_set_name);
@@ -1167,6 +1166,9 @@ static void add_randomness(void)
   xbt_dict_set(random_data_list, random_id, (void *) random, NULL);
 }
 
+/**
+ * create CPU resource via CPU Model
+ */
 void surf_host_create_resource(char *name, double power_peak,
         double power_scale,
         tmgr_trace_t power_trace,
@@ -1178,16 +1180,61 @@ void surf_host_create_resource(char *name, double power_peak,
                create_resource(name,power_peak,power_scale,power_trace,state_initial,state_trace,cpu_properties);
 }
 
+/*
+ * create CPU resource via worsktation_ptask_L07 model
+ */
 
-void surf_link_create_resouce(char *name,
+void surf_wsL07_host_create_resource(char *name, double power_peak,
+        double power_scale,
+        tmgr_trace_t power_trace,
+        e_surf_resource_state_t state_initial,
+        tmgr_trace_t state_trace,
+        xbt_dict_t cpu_properties)
+{
+       surf_workstation_model->extension.workstation.
+               cpu_create_resource(name,power_peak,power_scale,power_trace,state_initial,state_trace,cpu_properties);
+}
+/*
+ * create link resource via network Model
+ */
+void surf_link_create_resource(char *name,
         double bw_initial,
-        double lat_initial)
+        tmgr_trace_t bw_trace,
+        double lat_initial,
+        tmgr_trace_t lat_trace,
+        e_surf_resource_state_t
+        state_initial,
+        tmgr_trace_t state_trace,
+        e_surf_link_sharing_policy_t policy,
+        xbt_dict_t properties)
 {
        return surf_network_model->extension.network.
-            create_resource(name,bw_initial,lat_initial);
+            create_resource(name,bw_initial,bw_trace,lat_initial,lat_trace,
+                        state_initial,state_trace,policy,properties);
 
 }
 
+/*
+ * create link resource via workstation_ptask_L07 model
+ */
+
+void surf_wsL07_link_create_resource(char *name,
+                 double bw_initial,
+                 tmgr_trace_t bw_trace,
+                 double lat_initial,
+                 tmgr_trace_t lat_trace,
+                 e_surf_resource_state_t
+                 state_initial,
+                 tmgr_trace_t state_trace,
+                 e_surf_link_sharing_policy_t
+                 policy, xbt_dict_t properties)
+{
+       return surf_workstation_model->extension.workstation.
+       link_create_resource(name,bw_initial,bw_trace,lat_initial,lat_trace,
+                                               state_initial,state_trace,policy,properties);
+}
+
+
 /**
  * Route: add route element bypassing the parser :
  * same job as parse_route_elem
@@ -1231,6 +1278,12 @@ void surf_add_link_traces(void)
        return surf_network_model->extension.network.
                         add_traces();
 }
+
+void surf_wsL07_add_traces(void)
+{
+       return surf_workstation_model->extension.workstation.
+                       add_traces();
+}
 /**
  * set routes
  */
@@ -1238,3 +1291,4 @@ void surf_set_routes(void)
 {
        routing_set_routes();
 }
+