Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Added a new network model option, LegrandVelho, based on recent evaluation studies.
[simgrid.git] / src / include / surf / surf.h
index 7c10146..afb35ac 100644 (file)
@@ -12,6 +12,7 @@
 #include "xbt/dynar.h"
 #include "xbt/dict.h"
 #include "xbt/misc.h"
+#include "portable.h"
 
 SG_BEGIN_DECL()
 
@@ -74,7 +75,7 @@ typedef struct surf_action {
   double finish;               /**< finish time : this is modified during the run
                                 * and fluctuates until the task is completed */
   void *data;                  /**< for your convenience */
-  int using;
+  int refcount ;
   surf_model_t model_type;
 } s_surf_action_t;
 
@@ -260,6 +261,7 @@ typedef struct surf_network_model_extension_public {
   const char* (*get_link_name) (const void *link);
   double (*get_link_bandwidth) (const void *link);
   double (*get_link_latency) (const void *link);
+  int (*link_shared) (const void *link);
 } s_surf_network_model_extension_public_t,
     *surf_network_model_extension_public_t;
 
@@ -284,6 +286,17 @@ XBT_PUBLIC(void) create_workstations(void);
  */
 XBT_PUBLIC_DATA(surf_network_model_t) surf_network_model;
 
+/** \brief Initializes the platform with the network model 'LagrangeVelho'
+ *  \ingroup SURF_models
+ *  \param filename XML platform file name
+ *
+ * This model is proposed by Arnaud Legrand and Pedro Velho based on
+ * the results obtained with the GTNets simulator for onelink and
+ * dogbone sharing scenarios.
+ *
+ *  \see surf_workstation_model_init_LegrandVelho()
+ */
+XBT_PUBLIC(void) surf_network_model_init_LegrandVelho(const char *filename);
 
 /** \brief Initializes the platform with the network model 'Constant'
  *  \ingroup SURF_models
@@ -420,6 +433,7 @@ typedef struct surf_workstation_model_extension_public {
   const char* (*get_link_name) (const void *link);                     /**< Return the name of a network link */
   double (*get_link_bandwidth) (const void *link);                     /**< Return the current bandwidth of a network link */
   double (*get_link_latency) (const void *link);                       /**< Return the current latency of a network link */
+  int (*link_shared) (const void *link);
 } s_surf_workstation_model_extension_public_t,
     *surf_workstation_model_extension_public_t;
 
@@ -590,7 +604,7 @@ XBT_PUBLIC_DATA(int) route_action;
 /* This is used by all models when creating the routing table while parsing */
 XBT_PUBLIC_DATA(xbt_dict_t) route_table;
 XBT_PUBLIC_DATA(xbt_dict_t) route_multi_table;
-XBT_PUBLIC_DATA(xbt_dict_t) route_multi_table;
+
 
 /* For the trace and trace:connect tag (store their content till the end of the parsing) */
 XBT_PUBLIC_DATA(xbt_dict_t) traces_set_list;