public GeneratorCestujucych(double mean, string nazov, double oneskorenie, int kolko, Random seed) { ExponentialRng = new ExponentialRNG(mean, seed); Nazov = nazov; Oneskorenie = oneskorenie; Kolko = kolko; }
public MySimulation(double startTime, double hockeyMatchTime, double endTime) { StartTime = startTime; HockeyMatchTime = hockeyMatchTime; EndTime = endTime; // init input properties LineVehicles = new[] { new List <int>(), new List <int>(), new List <int>() }; LineBusesStartTimes = new[] { new List <double>(), new List <double>(), new List <double>() }; LineMicrobuses = new[] { 0, 0, 0 }; LineMicrobusesStartTimes = new[] { new List <double>(), new List <double>(), new List <double>() }; // init statistics AveragePassengerWaitingTimeSim = new Stat(); ArrivedAfterStartRatioSim = new Stat(); AverageVehicleLoadSim = new Stat(); // init configuration properties LinesConfiguration = new LinesConfiguration(); // init generators Random seedGenerator = new Random(); ExponentialRNG.SetSeedGen(seedGenerator); TriangularRNG.SetSeedGen(seedGenerator); UniformContinuousRNG.SetSeedGen(seedGenerator); Init(); }
private double GeneratorTimeSample(ExponentialRNG gen) { return(Math.Abs(gen.Sample())); }