Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
constructor(
arrivalCount: number,
earliestArrivalTime: SimTime,
latestArrivalTime: SimTime,
turnAroundTime: SimTime,
minConnectionTime: SimTime,
maxItemsPerTransfer: number
) {
this.minConnectionTime = minConnectionTime;
this.maxItemsPerTransfer = maxItemsPerTransfer;
this.turnAroundTime = turnAroundTime;
this.distribution = new Gaussian(minConnectionTime * 1.5, 25 * minConnectionTime * minConnectionTime);
this.random = seedrandom('seed1');
this.berthFactory = new IdFactory();
this.journeyFactory = new IdFactory();
this.jobFactory = new JobFactory();
this.clock = new Clock();
this.arrivals = [];
this.departures = [];
this.turnArounds = [];
this.berths = [];
this.transfers = [];
// Create random arrivals.
for (let i = 0; i < arrivalCount; ++i) {
public static generateNormalDistributionValue(
mean: number = 0.0,
stdVar: number = 1.0,
engine: Engine = Generator.DEFAULT_ENGINE,
): number {
const dist = new Gaussian(mean, stdVar);
return dist.ppf(this.generateProbability(engine));
}