diff --git a/src/main/java/net/berack/upo/valpre/sim/Net.java b/src/main/java/net/berack/upo/valpre/sim/Net.java index b69a1a6..1246972 100644 --- a/src/main/java/net/berack/upo/valpre/sim/Net.java +++ b/src/main/java/net/berack/upo/valpre/sim/Net.java @@ -75,7 +75,6 @@ public final class Net implements Iterable { * @param weight The probability of the child node. * @throws IndexOutOfBoundsException if one of the two nodes are not in the net * @throws IllegalArgumentException if the weight is negative or zero - * @throws IllegalArgumentException if the child is a source node */ public void addConnection(int parent, int child, double weight) { if (weight <= 0) @@ -85,9 +84,6 @@ public final class Net implements Iterable { if (parent < 0 || child < 0 || parent > max || child > max) throw new IndexOutOfBoundsException("One of the nodes does not exist"); - if (this.servers.get(child).spawnArrivals > 0) - throw new IllegalArgumentException("Can't connect to a source node"); - var list = this.connections.get(parent); list.removeIf(conn -> conn.index == child); list.add(new Connection(child, weight));