int main(int argc, char **argv) { Intersection isec; if(argc!=3) { printf("needs: Q1phase Q2phase\n"); exit(0); } Q1phase=atoi(argv[1]); Q2phase=atoi(argv[2]); if(Q1phase < 30 || Q2phase < 30) { printf("Minimum time for each queue to be closed is 30 seconds\n"); exit(0); } isec.SetPhasing(0,Q1phase); isec.SetPhasing(1,Q2phase); isec.SetCarAdd(0,Q1arrive); isec.SetCarAdd(1,Q1arrive); while(isec.time()<=7200) { isec.Tick(); } printf("Queue 1 length: %d\n",isec.QueueLength(0)); printf("Queue 2 length: %d\n",isec.QueueLength(1)); return 0; }