Changed logic for Unavailable

This commit is contained in:
2025-01-28 19:12:05 +01:00
parent 75b12788c8
commit 0fba0cc1fc
8 changed files with 220 additions and 87 deletions

View File

@@ -29,13 +29,21 @@ public class Main {
csv = arguments.get("csv");
var parallel = arguments.containsKey("p");
// varius distributions
var distrExp = new Distribution.Exponential(lambda);
var distrNorm = new Distribution.NormalBoxMuller(mu, sigma);
var distrUnav = new Distribution.UnavailableTime(0.2, distrNorm);
// Build the network
var net = new Net();
var node1 = ServerNode.createLimitedSource("Source", new Distribution.Exponential(lambda), total);
var node2 = ServerNode.createQueue("Queue", 1, new Distribution.NormalBoxMuller(mu, sigma));
var node1 = ServerNode.createLimitedSource("Source", distrExp, total);
var node2 = ServerNode.createQueue("Queue", 1, distrNorm);
var node3 = ServerNode.createQueue("Queue Wait", 1, distrNorm, distrUnav);
net.addNode(node1);
net.addNode(node2);
net.addNode(node3);
net.addConnection(node1, node2, 1.0);
net.addConnection(node2, node3, 1.0);
net.normalizeWeights();
/// Run multiple simulations