JAS-mine maintains and develops the JAS simulation platform, a discrete-event tool-kit for agent-based and dynamic microsimulation modelling. This repository contains the core libraries. See www.jas-mine.net for more details.
SimulationEngine.getRnd().nextDouble() generates numbers in [0, 1), not in [0, 1], which is not suitable for probabilities.
This affects at least AbstractSortByDifferenceAlignment.
UPD. SBDLAlignment relies on the values, provided by this rng. Since the formula used is log(1 / r - 1) we potentially get division by zero or cases of log(0).
SimulationEngine.getRnd().nextDouble()
generates numbers in[0, 1)
, not in[0, 1]
, which is not suitable for probabilities. This affects at leastAbstractSortByDifferenceAlignment
.See also https://stackoverflow.com/questions/3680637/generate-a-random-double-in-a-range and https://stackoverflow.com/questions/58920019/java-math-random-closed-double-interval
UPD.
SBDLAlignment
relies on the values, provided by this rng. Since the formula used islog(1 / r - 1)
we potentially get division by zero or cases oflog(0)
.