From d530b44e5ab91b275c477ec2634e76621cb5e0f1 Mon Sep 17 00:00:00 2001 From: fros4943 Date: Wed, 18 Feb 2009 10:11:32 +0000 Subject: [PATCH] using main random generator --- tools/cooja/java/se/sics/cooja/radiomediums/UDGM.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/tools/cooja/java/se/sics/cooja/radiomediums/UDGM.java b/tools/cooja/java/se/sics/cooja/radiomediums/UDGM.java index 636c329de..ca3dcf06c 100644 --- a/tools/cooja/java/se/sics/cooja/radiomediums/UDGM.java +++ b/tools/cooja/java/se/sics/cooja/radiomediums/UDGM.java @@ -26,7 +26,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: UDGM.java,v 1.18 2008/03/18 16:37:35 fros4943 Exp $ + * $Id: UDGM.java,v 1.19 2009/02/18 10:11:32 fros4943 Exp $ */ package se.sics.cooja.radiomediums; @@ -94,7 +94,6 @@ public class UDGM extends AbstractRadioMedium { private Random random = new Random(); - /** * Visualizes radio traffic in the UDGM. Allows a user to * change transmission ranges. @@ -429,7 +428,7 @@ public class UDGM extends AbstractRadioMedium { myRadioMedium = this; mySimulation = simulation; - random.setSeed(simulation.getRandomSeed()); + random = mySimulation.getRandomGenerator(); } public RadioConnection createConnections(Radio sendingRadio) { @@ -627,7 +626,7 @@ public class UDGM extends AbstractRadioMedium { SUCCESS_RATIO_RX = Double.parseDouble(element.getText()); } } - random.setSeed(mySimulation.getRandomSeed()); + random = mySimulation.getRandomGenerator(); return true; }