public static void main(String[] args){
		int usercount = 10000;
		int numBGClients = 16;
		String probs = "";
		double ZipfianMean = 0.27;
		DistOfAccess myDist;
		int numReqs = 100000000;
		int[] frequencies = new int[usercount];

		//construct the probability string
		//assuming all have the same prob
		for(int i=0; i<numBGClients; i++){
			probs+=(1.0/numBGClients)+"&";
		}
		//create the fragments for each BG client
		//for every client create its distribution and issue its requests
		for(int i=0; i<numBGClients; i++){
			Fragmentation createFrags = new Fragmentation(usercount, numBGClients,i,probs, ZipfianMean);
			myDist = createFrags.getMyDist();
			int[] myMembers = createFrags.getMyMembers();
			Member[] myMemberObjs = new Member[myMembers.length];
			for(int j=0; j<myMembers.length;j++){
				//assuming there is one shard per client (as we are trying to remove the effect of activation and deactivation)
				Member newMember = new Member(myMembers[j], j, 0 , j);
				myMemberObjs[j] = newMember;
			}
			//issue requests for this client
			for(int j=0; j<numReqs; j++){
				int idx = myDist.GenerateOneItem()-1;
				int key = myMembers[idx];
				frequencies[key]++;
			}
		}
		try {
			String fileName = "DZipfian"+usercount+"-"+numBGClients+"-"+(numBGClients*numReqs)+".txt";
			FileWriter fstream = new FileWriter(fileName);
			BufferedWriter out = new BufferedWriter(fstream);
			//print the frequencies
			for(int i=0; i<usercount; i++){
				System.out.println((i+1)+", "+frequencies[i]);
				out.write((i+1)+", "+frequencies[i]+"\n");
			}
			out.close();
		} catch (IOException e) {
			e.printStackTrace();
		}

	}