public void lifeCycle() {

//		int loop = 1;
//		while(true){
//			double time = MonitorSysSim.getTaskArrivalTime();
//			hold(new TimeSpan(time));
//			for(int i = 0; i < 4 ; i++){
//				totalQuc[i] += MonitorSysSim.getQuc(totalVolume[i], i);
//				switch(i){
//				case DISK:
//					lossQuc[i] += MonitorSysSim.getQuc(lossVolume[i] * loop, i);	
//					loop ++;
//					break;
//				case NETWORK:
//					lossQuc[i] += MonitorSysSim.getQuc(lossVolume[i] / time , i);
//				default:
//					lossQuc[i] += MonitorSysSim.getQuc(lossVolume[i], i);	
//				}
//			}
//		}
		
		Random rand = new Random(47);
		int host_num = 0;
		int cluster_num = (int) Math.sqrt(host_num);	
		
		TreeSet<RMN> rigisterRoot = new TreeSet<RMN>(( new Comparator<RMN>(){

			@Override
			public int compare(RMN arg0, RMN arg1) {
				// TODO Auto-generated method stub
				if(arg0.host_num < arg1.host_num)
					return -1;
				else 
					return 1;
				
			}
			
		}));
		
		int seq = 0;
		while(host_num < 10000){
			int num = rand.nextInt(100) + 1;
			host_num += num;
			cluster_num = (int) Math.sqrt(host_num);
			RMN rmn = new RMN(model, "rmn#" + seq, true, seq, layer+1, host_num);
			
			rigisterRoot.add(rmn);
			
			while(cluster_num < rigisterRoot.size() && rigisterRoot.size() > 1){
				RMN integer1 = rigisterRoot.pollFirst();
				RMN integer2 = rigisterRoot.pollFirst();
				RMN integer3;
				if(integer1.host_num > integer2.host_num){
					integer3 = integer1.merge(integer2);
				}else{
					integer3 = integer2.merge(integer1);
				}
				rigisterRoot.add(integer3);					
			}
			
		}
		
	}