Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Corrected jitter, now oscillates between [-lat*jitter,+lat*jitter), mean is granted...
authorvelho <velho@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Thu, 8 Oct 2009 08:01:25 +0000 (08:01 +0000)
committervelho <velho@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Thu, 8 Oct 2009 08:01:25 +0000 (08:01 +0000)
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@6743 48e7efb5-ca39-0410-a469-dd3cf9ba447f

src/surf/gtnets/gtnets_simulator.cc
src/surf/surf_config.c

index 4a9a950..2acaf14 100644 (file)
@@ -101,7 +101,7 @@ int GTSim::add_link(int id, double bandwidth, double latency){
   gtnets_links_[id] = new Linkp2p(bw, latency);
   if(jitter_ > 0){
        DEBUG1("Using jitter %f", jitter_);
   gtnets_links_[id] = new Linkp2p(bw, latency);
   if(jitter_ > 0){
        DEBUG1("Using jitter %f", jitter_);
-       double min = 0.0;
+       double min = -1*jitter_*latency;
        double max = jitter_*latency;
        if(uniform_jitter_ == NULL){
                uniform_jitter_ = new Uniform(min,max);
        double max = jitter_*latency;
        if(uniform_jitter_ == NULL){
                uniform_jitter_ = new Uniform(min,max);
index d19ca40..649e6fe 100644 (file)
@@ -200,7 +200,7 @@ void surf_config_init(int *argc, char **argv)
 
 #ifdef HAVE_GTNETS
     xbt_cfg_register(&_surf_cfg_set, "gtnets_jitter",
 
 #ifdef HAVE_GTNETS
     xbt_cfg_register(&_surf_cfg_set, "gtnets_jitter",
-                     "Double value to inflate the link latency, latency plus random in [0,latency*gtnets_jitter)", xbt_cfgelm_double,
+                     "Double value to oscillate the link latency, uniformly in random interval [-latency*gtnets_jitter,latency*gtnets_jitter)", xbt_cfgelm_double,
                      NULL, 1, 1, _surf_cfg_cb__gtnets_jitter, NULL);
     xbt_cfg_set_double(_surf_cfg_set, "gtnets_jitter", 1.0);
 #endif
                      NULL, 1, 1, _surf_cfg_cb__gtnets_jitter, NULL);
     xbt_cfg_set_double(_surf_cfg_set, "gtnets_jitter", 1.0);
 #endif