Apply Mathieu's change: remove all calls to SetSeed
authorRaj Bhattacharjea <raj.b@gatech.edu>
Thu, 22 Jan 2009 14:11:09 -0500
changeset 4225 f1d873a81159
parent 4224 40e5d5af3c71
child 4226 a08201e94eb2
Apply Mathieu's change: remove all calls to SetSeed
examples/csma-bridge-one-hop.cc
examples/csma-bridge.cc
examples/csma-bridge.py
examples/csma-broadcast.cc
examples/csma-multicast.cc
examples/csma-one-subnet.cc
examples/csma-packet-socket.cc
examples/csma-ping.cc
examples/csma-raw-ip-socket.cc
examples/csma-star.cc
examples/first.cc
examples/global-routing-slash32.cc
examples/realtime-udp-echo.cc
examples/second.cc
examples/simple-alternate-routing.cc
examples/simple-error-model.cc
examples/simple-global-routing.cc
examples/simple-point-to-point-olsr.cc
examples/star.cc
examples/static-routing-slash32.cc
examples/tcp-large-transfer.cc
examples/tcp-nsc-lfn.cc
examples/tcp-nsc-zoo.cc
examples/tcp-star-server.cc
examples/third.cc
examples/wifi-wired-bridging.cc
--- a/examples/csma-bridge-one-hop.cc	Thu Jan 22 14:10:40 2009 -0500
+++ b/examples/csma-bridge-one-hop.cc	Thu Jan 22 14:11:09 2009 -0500
@@ -92,12 +92,6 @@
 #endif
 
   //
-  // Make the random number generators generate reproducible results.
-  //
-  uint32_t seed[6] = {1, 1, 2, 3, 5, 8};
-  SeedManager::SetSeed(seed);
-
-  //
   // Allow the user to override any of the defaults and the above Bind() at
   // run-time, via command-line arguments
   //
--- a/examples/csma-bridge.cc	Thu Jan 22 14:10:40 2009 -0500
+++ b/examples/csma-bridge.cc	Thu Jan 22 14:11:09 2009 -0500
@@ -54,12 +54,6 @@
 #endif
 
   //
-  // Make the random number generators generate reproducible results.
-  //
-  uint32_t seed[6] = {1, 1, 2, 3, 5, 8};
-  SeedManager::SetSeed(seed);
-
-  //
   // Allow the user to override any of the defaults and the above Bind() at
   // run-time, via command-line arguments
   //
--- a/examples/csma-bridge.py	Thu Jan 22 14:10:40 2009 -0500
+++ b/examples/csma-bridge.py	Thu Jan 22 14:11:09 2009 -0500
@@ -32,11 +32,6 @@
 
 
 def main(argv):
-    #
-    # Make the random number generators generate reproducible results.
-    #
-    seed = array([1, 1, 2, 3, 5, 8]);
-    ns3.SeedManager.SetSeed(seed)
 
     #
     # Allow the user to override any of the defaults and the above Bind() at
--- a/examples/csma-broadcast.cc	Thu Jan 22 14:10:40 2009 -0500
+++ b/examples/csma-broadcast.cc	Thu Jan 22 14:11:09 2009 -0500
@@ -51,12 +51,6 @@
 #endif
   LogComponentEnable ("CsmaBroadcastExample", LOG_PREFIX_TIME);
 
-  //
-  // Make the random number generators generate reproducible results.
-  //
-  uint32_t seed[6] = {1, 1, 2, 3, 5, 8};
-  SeedManager::SetSeed(seed);
-
   // Allow the user to override any of the defaults and the above
   // Bind()s at run-time, via command-line arguments
   CommandLine cmd;
--- a/examples/csma-multicast.cc	Thu Jan 22 14:10:40 2009 -0500
+++ b/examples/csma-multicast.cc	Thu Jan 22 14:11:09 2009 -0500
@@ -51,11 +51,6 @@
   // LogComponentEnable ("CsmaMulticastExample", LOG_LEVEL_INFO);
 
   //
-  // Make the random number generators generate reproducible results.
-  //
-  uint32_t seed[6] = {1, 1, 2, 3, 5, 8};
-  SeedManager::SetSeed(seed);
-  //
   // Set up default values for the simulation.  
   //
   // Select DIX/Ethernet II-style encapsulation (no LLC/Snap header)
--- a/examples/csma-one-subnet.cc	Thu Jan 22 14:10:40 2009 -0500
+++ b/examples/csma-one-subnet.cc	Thu Jan 22 14:11:09 2009 -0500
@@ -48,11 +48,6 @@
   LogComponentEnable ("CsmaOneSubnetExample", LOG_LEVEL_INFO);
 #endif
 //
-// Make the random number generators generate reproducible results.
-//
-  uint32_t seed[6] = {1, 1, 2, 3, 5, 8};
-  SeedManager::SetSeed(seed);
-//
 // Allow the user to override any of the defaults and the above Bind() at
 // run-time, via command-line arguments
 //
--- a/examples/csma-packet-socket.cc	Thu Jan 22 14:10:40 2009 -0500
+++ b/examples/csma-packet-socket.cc	Thu Jan 22 14:11:09 2009 -0500
@@ -57,11 +57,6 @@
   LogComponentEnable ("CsmaPacketSocketExample", LOG_LEVEL_INFO);
 #endif
 
-  //
-  // Make the random number generators generate reproducible results.
-  //
-  uint32_t seed[6] = {1, 1, 2, 3, 5, 8};
-  SeedManager::SetSeed(seed);
   CommandLine cmd;
   cmd.Parse (argc, argv);
 
--- a/examples/csma-ping.cc	Thu Jan 22 14:10:40 2009 -0500
+++ b/examples/csma-ping.cc	Thu Jan 22 14:11:09 2009 -0500
@@ -56,11 +56,6 @@
 int
 main (int argc, char *argv[])
 {
-  //
-  // Make the random number generators generate reproducible results.
-  //
-  uint32_t seed[6] = {1, 1, 2, 3, 5, 8};
-  SeedManager::SetSeed(seed);
 
   CommandLine cmd;
   cmd.Parse (argc, argv);
--- a/examples/csma-raw-ip-socket.cc	Thu Jan 22 14:10:40 2009 -0500
+++ b/examples/csma-raw-ip-socket.cc	Thu Jan 22 14:11:09 2009 -0500
@@ -54,12 +54,6 @@
   LogComponentEnable ("CsmaPacketSocketExample", LOG_LEVEL_INFO);
 #endif
 
-  //
-  // Make the random number generators generate reproducible results.
-  //
-  uint32_t seed[6] = {1, 1, 2, 3, 5, 8};
-  SeedManager::SetSeed(seed);
-
   CommandLine cmd;
   cmd.Parse (argc, argv);
 
--- a/examples/csma-star.cc	Thu Jan 22 14:10:40 2009 -0500
+++ b/examples/csma-star.cc	Thu Jan 22 14:11:09 2009 -0500
@@ -46,11 +46,6 @@
 int 
 main (int argc, char *argv[])
 {
-  //
-  // Make the random number generators generate reproducible results.
-  //
-  uint32_t seed[6] = {1, 1, 2, 3, 5, 8};
-  SeedManager::SetSeed(seed);
 
   //
   // Set up some default values for the simulation.
--- a/examples/first.cc	Thu Jan 22 14:10:40 2009 -0500
+++ b/examples/first.cc	Thu Jan 22 14:11:09 2009 -0500
@@ -29,9 +29,6 @@
   LogComponentEnable("UdpEchoClientApplication", LOG_LEVEL_INFO);
   LogComponentEnable("UdpEchoServerApplication", LOG_LEVEL_INFO);
 
-  uint32_t seed[6] = {1, 1, 2, 3, 5, 8};
-  SeedManager::SetSeed(seed);
-
   NodeContainer nodes;
   nodes.Create (2);
 
--- a/examples/global-routing-slash32.cc	Thu Jan 22 14:10:40 2009 -0500
+++ b/examples/global-routing-slash32.cc	Thu Jan 22 14:11:09 2009 -0500
@@ -38,10 +38,6 @@
 int 
 main (int argc, char *argv[])
 {
-  // Make the random number generators generate reproducible results.
-  //
-  uint32_t seed[6] = {1, 1, 2, 3, 5, 8};
-  SeedManager::SetSeed(seed);
 
   // Allow the user to override any of the defaults and the above
   // DefaultValue::Bind ()s at run-time, via command-line arguments
--- a/examples/realtime-udp-echo.cc	Thu Jan 22 14:10:40 2009 -0500
+++ b/examples/realtime-udp-echo.cc	Thu Jan 22 14:11:09 2009 -0500
@@ -38,11 +38,6 @@
 main (int argc, char *argv[])
 {
   //
-  // Make the random number generators generate reproducible results.
-  //
-  uint32_t seed[6] = {1, 1, 2, 3, 5, 8};
-  SeedManager::SetSeed(seed);
-  //
   // Allow the user to override any of the defaults and the above Bind() at
   // run-time, via command-line arguments
   //
--- a/examples/second.cc	Thu Jan 22 14:10:40 2009 -0500
+++ b/examples/second.cc	Thu Jan 22 14:11:09 2009 -0500
@@ -39,9 +39,6 @@
   LogComponentEnable("UdpEchoClientApplication", LOG_LEVEL_INFO);
   LogComponentEnable("UdpEchoServerApplication", LOG_LEVEL_INFO);
 
-  uint32_t seed[6] = {1, 1, 2, 3, 5, 8};
-  SeedManager::SetSeed(seed);
-
   uint32_t nCsma = 3;
   CommandLine cmd;
   cmd.AddValue ("nCsma", "Number of \"extra\" CSMA nodes/devices", nCsma);
--- a/examples/simple-alternate-routing.cc	Thu Jan 22 14:10:40 2009 -0500
+++ b/examples/simple-alternate-routing.cc	Thu Jan 22 14:11:09 2009 -0500
@@ -57,11 +57,6 @@
   LogComponentEnable("GlobalRouter", LOG_LOGIC);
 #endif
 
-  //
-  // Make the random number generators generate reproducible results.
-  //
-  uint32_t seed[6] = {1, 1, 2, 3, 5, 8};
-  SeedManager::SetSeed(seed);
 
   Config::SetDefault ("ns3::OnOffApplication::PacketSize", UintegerValue (210));
   Config::SetDefault ("ns3::OnOffApplication::DataRate", StringValue ("300b/s"));
--- a/examples/simple-error-model.cc	Thu Jan 22 14:10:40 2009 -0500
+++ b/examples/simple-error-model.cc	Thu Jan 22 14:11:09 2009 -0500
@@ -59,11 +59,6 @@
   LogComponentEnable ("SimplePointToPointExample", LOG_LEVEL_INFO);
 #endif
 
-  //
-  // Make the random number generators generate reproducible results.
-  //
-  uint32_t seed[6] = {1, 1, 2, 3, 5, 8};
-  SeedManager::SetSeed(seed);
 
   // Set a few attributes
   Config::SetDefault ("ns3::RateErrorModel::ErrorRate", DoubleValue (0.01));
--- a/examples/simple-global-routing.cc	Thu Jan 22 14:10:40 2009 -0500
+++ b/examples/simple-global-routing.cc	Thu Jan 22 14:11:09 2009 -0500
@@ -61,12 +61,6 @@
   LogComponentEnable ("SimpleGlobalRoutingExample", LOG_LEVEL_INFO);
 #endif
 
-  //
-  // Make the random number generators generate reproducible results.
-  //
-  uint32_t seed[6] = {1, 1, 2, 3, 5, 8};
-  SeedManager::SetSeed(seed);
-
   // Set up some default values for the simulation.  Use the 
   Config::SetDefault ("ns3::OnOffApplication::PacketSize", UintegerValue (210));
   Config::SetDefault ("ns3::OnOffApplication::DataRate", StringValue ("448kb/s"));
--- a/examples/simple-point-to-point-olsr.cc	Thu Jan 22 14:10:40 2009 -0500
+++ b/examples/simple-point-to-point-olsr.cc	Thu Jan 22 14:11:09 2009 -0500
@@ -60,12 +60,6 @@
   LogComponentEnable ("SimpleGlobalRoutingExample", LOG_LEVEL_INFO);
 #endif
 
-  //
-  // Make the random number generators generate reproducible results.
-  //
-  uint32_t seed[6] = {1, 1, 2, 3, 5, 8};
-  SeedManager::SetSeed(seed);
-
   // Set up some default values for the simulation.  Use the 
 
   Config::SetDefault ("ns3::OnOffApplication::PacketSize", UintegerValue (210));
--- a/examples/star.cc	Thu Jan 22 14:10:40 2009 -0500
+++ b/examples/star.cc	Thu Jan 22 14:11:09 2009 -0500
@@ -40,11 +40,6 @@
 int 
 main (int argc, char *argv[])
 {
-  //
-  // Make the random number generators generate reproducible results.
-  //
-  uint32_t seed[6] = {1, 1, 2, 3, 5, 8};
-  SeedManager::SetSeed(seed);
 
   //
   // Set up some default values for the simulation.
--- a/examples/static-routing-slash32.cc	Thu Jan 22 14:10:40 2009 -0500
+++ b/examples/static-routing-slash32.cc	Thu Jan 22 14:11:09 2009 -0500
@@ -37,10 +37,6 @@
 int 
 main (int argc, char *argv[])
 {
-  // Make the random number generators generate reproducible results.
-  //
-  uint32_t seed[6] = {1, 1, 2, 3, 5, 8};
-  SeedManager::SetSeed(seed);
 
   // Allow the user to override any of the defaults and the above
   // DefaultValue::Bind ()s at run-time, via command-line arguments
--- a/examples/tcp-large-transfer.cc	Thu Jan 22 14:10:40 2009 -0500
+++ b/examples/tcp-large-transfer.cc	Thu Jan 22 14:11:09 2009 -0500
@@ -67,11 +67,6 @@
   //  LogComponentEnable("PacketSink", LOG_LEVEL_ALL);
   //  LogComponentEnable("TcpLargeTransfer", LOG_LEVEL_ALL);
 
-  //
-  // Make the random number generators generate reproducible results.
-  //
-  uint32_t seed[6] = {1, 1, 2, 3, 5, 8};
-  SeedManager::SetSeed(seed);
 
   // Allow the user to override any of the defaults and the above
   // Bind()s at run-time, via command-line arguments
--- a/examples/tcp-nsc-lfn.cc	Thu Jan 22 14:10:40 2009 -0500
+++ b/examples/tcp-nsc-lfn.cc	Thu Jan 22 14:11:09 2009 -0500
@@ -46,8 +46,6 @@
 
 int main (int argc, char *argv[])
 {
-  uint32_t seed[6] = {1, 1, 2, 3, 5, 8};
-  SeedManager::SetSeed(seed);
 
   Config::SetDefault ("ns3::OnOffApplication::PacketSize", UintegerValue (4096));
   Config::SetDefault ("ns3::OnOffApplication::DataRate", StringValue ("6Mbps"));
--- a/examples/tcp-nsc-zoo.cc	Thu Jan 22 14:10:40 2009 -0500
+++ b/examples/tcp-nsc-zoo.cc	Thu Jan 22 14:11:09 2009 -0500
@@ -47,9 +47,6 @@
   unsigned int MaxNodes = 4;
   unsigned int runtime = 3;
 
-  uint32_t seed[6] = {1, 1, 2, 3, 5, 8};
-  SeedManager::SetSeed(seed);
-
   Config::SetDefault ("ns3::OnOffApplication::PacketSize", UintegerValue (2048));
   Config::SetDefault ("ns3::OnOffApplication::DataRate", StringValue ("8kbps"));
   CommandLine cmd;
--- a/examples/tcp-star-server.cc	Thu Jan 22 14:10:40 2009 -0500
+++ b/examples/tcp-star-server.cc	Thu Jan 22 14:11:09 2009 -0500
@@ -68,11 +68,6 @@
   //LogComponentEnable ("TcpL4Protocol", LOG_LEVEL_ALL);
   //LogComponentEnable ("TcpSocketImpl", LOG_LEVEL_ALL);
   //LogComponentEnable ("PacketSink", LOG_LEVEL_ALL);
-  //
-  // Make the random number generators generate reproducible results.
-  //
-  uint32_t seed[6] = {1, 1, 2, 3, 5, 8};
-  SeedManager::SetSeed(seed);
 
   // Set up some default values for the simulation.
   Config::SetDefault ("ns3::OnOffApplication::PacketSize", UintegerValue (250));
--- a/examples/third.cc	Thu Jan 22 14:10:40 2009 -0500
+++ b/examples/third.cc	Thu Jan 22 14:11:09 2009 -0500
@@ -43,9 +43,6 @@
   LogComponentEnable("UdpEchoClientApplication", LOG_LEVEL_INFO);
   LogComponentEnable("UdpEchoServerApplication", LOG_LEVEL_INFO);
 
-  uint32_t seed[6] = {1, 1, 2, 3, 5, 8};
-  SeedManager::SetSeed(seed);
-
   uint32_t nCsma = 3;
   uint32_t nWifi = 3;
   CommandLine cmd;
--- a/examples/wifi-wired-bridging.cc	Thu Jan 22 14:10:40 2009 -0500
+++ b/examples/wifi-wired-bridging.cc	Thu Jan 22 14:11:09 2009 -0500
@@ -63,9 +63,6 @@
   uint32_t nStas = 2;
   bool sendIp = true;
 
-  uint32_t seed[6] = {1, 1, 2, 3, 5, 8};
-  SeedManager::SetSeed(seed);
-
   CommandLine cmd;
   cmd.AddValue ("nWifis", "Number of wifi networks", nWifis);
   cmd.AddValue ("nStas", "Number of stations per wifi network", nStas);