From: velho Date: Thu, 8 Oct 2009 08:01:25 +0000 (+0000) Subject: Corrected jitter, now oscillates between [-lat*jitter,+lat*jitter), mean is granted... X-Git-Tag: SVN~971 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/78e5edee4cb3845cedd7b603d611129cce6a14e9 Corrected jitter, now oscillates between [-lat*jitter,+lat*jitter), mean is granted by the uniform distribution. git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@6743 48e7efb5-ca39-0410-a469-dd3cf9ba447f --- diff --git a/src/surf/gtnets/gtnets_simulator.cc b/src/surf/gtnets/gtnets_simulator.cc index 4a9a950920..2acaf1477e 100644 --- a/src/surf/gtnets/gtnets_simulator.cc +++ b/src/surf/gtnets/gtnets_simulator.cc @@ -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_); - double min = 0.0; + double min = -1*jitter_*latency; double max = jitter_*latency; if(uniform_jitter_ == NULL){ uniform_jitter_ = new Uniform(min,max); diff --git a/src/surf/surf_config.c b/src/surf/surf_config.c index d19ca40694..649e6fe00b 100644 --- a/src/surf/surf_config.c +++ b/src/surf/surf_config.c @@ -200,7 +200,7 @@ void surf_config_init(int *argc, char **argv) #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