Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Added a new network model option, LegrandVelho, based on recent evaluation studies.
authorvelho <velho@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Tue, 14 Oct 2008 16:41:27 +0000 (16:41 +0000)
committervelho <velho@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Tue, 14 Oct 2008 16:41:27 +0000 (16:41 +0000)
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@5986 48e7efb5-ca39-0410-a469-dd3cf9ba447f

src/include/surf/surf.h
src/surf/network.c
src/surf/surf.c

index 6f35cb7..afb35ac 100644 (file)
@@ -286,6 +286,17 @@ XBT_PUBLIC(void) create_workstations(void);
  */
 XBT_PUBLIC_DATA(surf_network_model_t) surf_network_model;
 
  */
 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
 
 /** \brief Initializes the platform with the network model 'Constant'
  *  \ingroup SURF_models
index 2c81953..8555a3a 100644 (file)
@@ -766,6 +766,24 @@ static void surf_network_model_init_internal(void)
     network_maxmin_system = lmm_system_new();
 }
 
     network_maxmin_system = lmm_system_new();
 }
 
+/***************************************************************************/
+/* New TCP sharing model based on thesis experimantation and discussions.  */
+/***************************************************************************/
+void surf_network_model_init_LegrandVelho(const char *filename)
+{
+  if (surf_network_model)
+    return;
+  surf_network_model_init_internal();
+  define_callbacks(filename);
+  xbt_dynar_push(model_list, &surf_network_model);
+  network_solve = lmm_solve;
+
+  update_model_description(surf_network_model_description,
+                          "LegrandVelho",
+                          (surf_model_t) surf_network_model);
+  INFO0("LegrandVelho Model was chosen!!");
+}
+
 /***************************************************************************/
 /* The nice TCP sharing model designed by Loris Marchal and Henri Casanova */
 /***************************************************************************/
 /***************************************************************************/
 /* The nice TCP sharing model designed by Loris Marchal and Henri Casanova */
 /***************************************************************************/
index 8a2a893..a1d6ebf 100644 (file)
@@ -129,6 +129,7 @@ const char *surf_action_state_names[6] = {
 s_surf_model_description_t surf_network_model_description[] = {
   {"Constant", NULL, surf_network_model_init_Constant},
   {"CM02", NULL, surf_network_model_init_CM02},
 s_surf_model_description_t surf_network_model_description[] = {
   {"Constant", NULL, surf_network_model_init_Constant},
   {"CM02", NULL, surf_network_model_init_CM02},
+  {"LegrandVelho", NULL, surf_network_model_init_LegrandVelho},
 #ifdef HAVE_GTNETS
   {"GTNets", NULL, surf_network_model_init_GTNETS},
 #endif
 #ifdef HAVE_GTNETS
   {"GTNets", NULL, surf_network_model_init_GTNETS},
 #endif