<div dir="ltr">Hi ,<div><br><div>there is any one who can tell me how can I change my producer node randomly  at every simulation.</div><div><br></div><div>I try to use rand():</div><div><div>NodeContainer c;<span class="" style="white-space:pre">                            </span>// NodeContainer <span class="" style="white-space:pre">                 </span></div><div>c.Create (4);<span class="" style="white-space:pre">      </span></div></div><div>int a=1+rand()%3 // to generate an integer between 1 and 4 </div><div><br></div><div><div>  producerHelper.Install (c.Get (a));</div><div><br></div><div>but when I want to display the value of a </div><div><br></div><div><div>  std::cout << "a = "  << a <<"\n";</div></div><div><br></div><div>I have the same value even when I re-simulate my code.</div><div><br></div><div>thnx a  lot.</div><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr"><div><span style="color:rgb(0,0,0)">Cordialement </span></div><div><span style="color:rgb(0,0,0)">Imen Dhiab</span></div><div><span style="color:rgb(0,0,0)"><br></span></div><div><span style="color:rgb(0,0,0)">***************************************************************************************************</span><br></div><div><font color="#000000">Ingénieur Informatique diplômé de l'Ecole Nationale d'Ingénieurs de Sfax.</font></div><div><font color="#000000">Membre de l'unité de recherche SAGE (Systèmes Avancés en Génie Electrique), Ecole Nationale d'Ing</font><span style="color:rgb(0,0,0)">énieurs de Sousse.</span></div><div><font color="#000000">+216 53 59 19 88</font></div><div><font color="#000000">Pages personnelles : <a href="http://www.sage-eniso.org/profile-membre/fr/T/85/dhiab-imene.html" target="_blank">http://www.sage-eniso.org/profile-membre/fr/T/85/dhiab-imene.html</a></font></div><div>***************************************************************************************************</div></div></div>
</div></div></div>