예제 #1
0
 public Cmo(int _max_count)
 {
     set_start_id();
     time = 0;
     all_clients = 0;
     refused_clients = 0;
     tot_xchg = 0;
     tot_acnt = 0;
     tot_cred = 0;
     tot_card = 0;
     is_working = true;
     day_time = 300; //рабочий день - 5 минут))
     set_random_creatime();
     RT = request_type.NONE;
     clients = new Queue[2];
     clients[0] = new Queue(_max_count); //очередь на 1-2 кассы (обмен)
     clients[1] = new Queue(_max_count); //очередь на 3-7 кассы (остальные операции)
     kasses = new Operator[7];
     for (int i = 0; i < 7; i++)
     {
         if (i < 2)
             kasses[i] = new Operator(kassa_type.N12);
         else
             kasses[i] = new Operator(kassa_type.N37);
     }
 }
예제 #2
0
 public Queue(Queue _other)
 {
     max_count = _other.max_count;
     count = _other.count;
     head = _other.head;
     tail = _other.tail;
     pool = new Client[max_count];
     for (int i = head; i < head + count; i++)
         pool[i % max_count] = _other.pool[i % max_count];
 }