Hi,
In several places, JBotSim uses java.util.Random class or Math.random() to produce randomized behaviors. In order to allow reproducible simulations like tests, it is unavoidable to have some mean to control pseudo-random number generators (PRNG) used by the library, examples, ... Topology could offer such API but it would mean a topology is required everywhere a random number is used. A topology is not always available, for instance in the constructor of a Node.
A static API is perhaps a solution ...
Hi,
In several places, JBotSim uses
java.util.Randomclass or Math.random() to produce randomized behaviors. In order to allow reproducible simulations like tests, it is unavoidable to have some mean to control pseudo-random number generators (PRNG) used by the library, examples, ...Topologycould offer such API but it would mean a topology is required everywhere a random number is used. A topology is not always available, for instance in the constructor of aNode.A static API is perhaps a solution ...