- CsvResult and Result classes for improved iteration and CSV output;
- update SimulationBuilder to include confidence index handling
- rename setRuns to setMaxRuns for clarity
This commit is contained in:
2025-02-10 15:19:40 +01:00
parent 82c237bc16
commit 0ac111d94a
8 changed files with 281 additions and 31 deletions

View File

@@ -168,13 +168,11 @@ public class ServerNodeState {
* otherwise
*/
public Event spawnArrivalToChild(double time, Rng rng) {
if (!this.children.isEmpty()) {
var random = rng.random();
for (var child : this.children) {
random -= child.weight;
if (random <= 0)
return Event.newArrival(child.index, time);
}
var random = rng.random();
for (var child : this.children) {
random -= child.weight;
if (random <= 0)
return Event.newArrival(child.index, time);
}
return null;
}