public KiNCoL(int numberOfPeers, 
				  GeoMap map, 
				  float peerSpeed, 
				  int numberOfPackets, 
				  float hostilityFactor,
				  int beaconTimeout,
				  boolean gpsrSimulation){
		
		
		Logger.info("########## PARAMETERS RECEIVED ###########");
		Logger.info("Number of Peers:   \t " + numberOfPeers);
		Logger.info("Number of Packets: \t " + numberOfPackets);
		Logger.info("Map Size:          \t " + map);
		Logger.info("Peer Velocity:     \t " + peerSpeed);
		Logger.info("Hostility Factor:  \t " + hostilityFactor);
		Logger.info("");
		
		this.beaconTimeout = beaconTimeout;
		
		if(hostilityFactor > 0.5){
			Logger.info("Warning! You have specified a very hostile environment.");
		}
		
		this.hostilityFactor = hostilityFactor;
		this.numberOfPackets = numberOfPackets;
		this.gpsrSimulation = gpsrSimulation;
		
		peerEnvironment = new DefaultPeerEnvironment();
		
		if(beaconTimeout > 0)
			peerEnvironment.set("beacon-service-timeout", "" + beaconTimeout);
		
		statMonitor = new MasterStatMonitor();;
		
		agents = new PeerAgent[numberOfPeers];
		
		for(int i = 0; i < numberOfPeers; i++){
			
			Peer peer = new Peer(PeerAddress.generateRandomAddress(), "peer-" + i);
			GeoLocation peerLocation = GeoLocation.generateRandomGeoLocation(map);
			GeoVelocity peerVelocity = new GeoVelocity(peerSpeed, GeoLocation.generateRandomBearing());
			
			//Agent zero is the destination/sink and hence is stationary.
			GeoDevice geoDevice = (i == 0)? new DefaultGeoDevice(peerLocation, new GeoVelocity()) :
				                            new RandomWaypointGeoDevice(peerLocation, peerVelocity, map);
			
			PeerAgent agent = new PeerAgent(peer, peerEnvironment, geoDevice);
			agent.setGPSRSimulation(gpsrSimulation);
			agent.setStatMonitor(statMonitor);
			agents[i] = agent;
		}
		
	}