using main random generator
This commit is contained in:
parent
3c83d14059
commit
d530b44e5a
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user