public void start() {

		int count = 0;
		
		//While the simulation still has time or cars/pedestrians, keep processing events
		while((carList.size() > 0 && pedList.size() > 0) || currentTime < duration) {
			Event currentEvent = eventList.poll();
			currentTime = currentEvent.getTime();
			processEvent(currentEvent);
			count++;
			try {
				//Thread.sleep(1000);
			} catch (Exception e) {
				P.p("dasdfasdfasdf");
			}
		}
		
		tw.printEnd(currentTime);
		tw.closeFile();
		
		//Print statistics
		stats.setDuration(currentTime);
		stats.printStats();
		System.out.println("OUTPUT "+count);
	}