protected virtual void InitializeSystem(IInputAirport entrada) { ProcessTime = new double[CountTracks]; TimeDepartuteTime = new double[CountTracks]; FixedTime = new double[CountTracks]; DepartureTime = new double[CountTracks]; TimeEmptyTrack = new double[CountTracks]; Airplanes = new List <IAirplaneLoad>(); Tracks = new IAirplaneLoad[CountTracks]; QueueArrival = new Queue <IAirplaneLoad>(); aleatory = new Random(); exponentialVariable = new ExponentialVariable(); poissonVariable = new PoissonVariable(); normalVariable = new NormalVariable(); SystemTime = 0; InitializeArray(ProcessTime, infinity); InitializeArray(FixedTime, infinity); InitializeArray(DepartureTime, infinity); InitializeArray(TimeEmptyTrack, 0); InitializeArray(TimeDepartuteTime, 0); StopTime = entrada.Minutes; QuantityPassengers = 0; CountLoads = 0; ArrivalTime = GenerateTime(); }
public static IAirplaneLoad CreateAirplaneLoad(this IAirplane airplane, NormalVariable distribution) { distribution.M = porCientoMedia * airplane.MaxLoadSize; distribution.S2 = porCientoVar * airplane.MaxLoadSize; var carga = (int)Math.Max(distribution.GenerateValue(), 0); carga = Math.Min(airplane.MaxLoadSize, carga); return(new AirplaneLoad(airplane.Model, airplane.IsLoadAirplane(), airplane.MaxLoadSize, carga)); }