using main random generator

This commit is contained in:
fros4943 2009-02-18 10:11:32 +00:00
parent 3c83d14059
commit d530b44e5a

View File

@ -26,7 +26,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE. * 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; package se.sics.cooja.radiomediums;
@ -94,7 +94,6 @@ public class UDGM extends AbstractRadioMedium {
private Random random = new Random(); private Random random = new Random();
/** /**
* Visualizes radio traffic in the UDGM. Allows a user to * Visualizes radio traffic in the UDGM. Allows a user to
* change transmission ranges. * change transmission ranges.
@ -429,7 +428,7 @@ public class UDGM extends AbstractRadioMedium {
myRadioMedium = this; myRadioMedium = this;
mySimulation = simulation; mySimulation = simulation;
random.setSeed(simulation.getRandomSeed()); random = mySimulation.getRandomGenerator();
} }
public RadioConnection createConnections(Radio sendingRadio) { public RadioConnection createConnections(Radio sendingRadio) {
@ -627,7 +626,7 @@ public class UDGM extends AbstractRadioMedium {
SUCCESS_RATIO_RX = Double.parseDouble(element.getText()); SUCCESS_RATIO_RX = Double.parseDouble(element.getText());
} }
} }
random.setSeed(mySimulation.getRandomSeed()); random = mySimulation.getRandomGenerator();
return true; return true;
} }