From: velho Date: Tue, 14 Oct 2008 16:41:27 +0000 (+0000) Subject: Added a new network model option, LegrandVelho, based on recent evaluation studies. X-Git-Tag: v3.3~134 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/9b62031fae59dfc84cdcda62f6d4e35e1a55a7c5 Added a new network model option, LegrandVelho, based on recent evaluation studies. git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@5986 48e7efb5-ca39-0410-a469-dd3cf9ba447f --- diff --git a/src/include/surf/surf.h b/src/include/surf/surf.h index 6f35cb775b..afb35acf2d 100644 --- a/src/include/surf/surf.h +++ b/src/include/surf/surf.h @@ -286,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 diff --git a/src/surf/network.c b/src/surf/network.c index 2c81953488..8555a3a6a3 100644 --- a/src/surf/network.c +++ b/src/surf/network.c @@ -766,6 +766,24 @@ static void surf_network_model_init_internal(void) 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 */ /***************************************************************************/ diff --git a/src/surf/surf.c b/src/surf/surf.c index 8a2a893ab0..a1d6ebf4ec 100644 --- a/src/surf/surf.c +++ b/src/surf/surf.c @@ -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}, + {"LegrandVelho", NULL, surf_network_model_init_LegrandVelho}, #ifdef HAVE_GTNETS {"GTNets", NULL, surf_network_model_init_GTNETS}, #endif