Ejemplo n.º 1
0
        public Queue(IModeling modeling)
        {
            this.events = new Queue<Memory>();
            this.memories = new List<Memory>();

            this.CurrentModeling = modeling;
            this.Reset();
        }
Ejemplo n.º 2
0
        public Queue(IModeling modeling)
        {
            this.events   = new Queue <Memory>();
            this.memories = new List <Memory>();

            this.CurrentModeling = modeling;
            this.Reset();
        }
Ejemplo n.º 3
0
        public Device(IModeling modeling)
        {
            this.memories      = new List <Memory>();
            this.currentMemory = new Memory();

            this.Modeling = modeling;
            this.Queue    = new Queue(modeling);
            this.Reset();
            this.OnRelease += Device_OnRelease;
        }
Ejemplo n.º 4
0
        public Device(IModeling modeling)
        {
            this.memories = new List<Memory>();
            this.currentMemory = new Memory();

            this.Modeling = modeling;
            this.Queue = new Queue(modeling);
            this.Reset();
            this.OnRelease += Device_OnRelease;
        }
Ejemplo n.º 5
0
        static void modeling_OnCause_Arriving(IModeling modeling, IEvent @event)
        {
            modeling.Schedule(new Event {
                StartsSince = 7, Transaction = new Transaction {
                    Status = SampleTransactionStatus.Arriving
                }
            });

            @event.Transaction.Status = SampleTransactionStatus.DeviceAdvanced;
            mainDevice.Reserve(@event.Transaction);

            Console.WriteLine("[{0,5}]: Заявка встала в очередь на обработку.", modeling.Time);
        }
Ejemplo n.º 6
0
        static void modeling_OnCause_DeviceAdvanced(IModeling modeling, IEvent @event)
        {
            Console.WriteLine("[{0,5}]: Заявка обработана устройством.", modeling.Time);

            mainDevice.Release();
        }
Ejemplo n.º 7
0
        public MultichannelDevice(IModeling modeling)
        {
            this.devices = new List <Device>();

            this.Modeling = modeling;
        }
Ejemplo n.º 8
0
        public MultichannelDevice(IModeling modeling)
        {
            this.devices = new List<Device>();

            this.Modeling = modeling;
        }