cloudsim-plus-master/VmAllocationPSOResearch/src/org/cloudbus/cloudsim/allocationpolicies/trial.java
private List<Cloudlet> createCloudlets() {
	    	int count=0;
	    	int[] cLength= {12577, 11063, 11985, 11633, 11291, 10960, 10638, 6964, 6827, 6691, 6559, 1272, 1267, 1262, 1257, 4725, 4655, 4587, 4519, 4876, 4797, 4719, 4643, 5449, 5344, 5240, 5139, 2858, 2827, 2796, 2765, 2501, 2476, 2451, 2426, 2402, 2378, 9161, 8804, 8461, 8132, 7815, 7511, 7218, 4252, 4151, 4051, 3955, 3860, 3768, 3678, 2867, 2813, 2759, 2706, 2677, 2625, 2575, 2525, 2477, 2429, 3474, 3377, 3282, 3190, 2441, 2387, 2335, 2283, 2233, 2183, 2135, 2088, 1859, 1822, 1785, 1750, 1714, 1680, 1646, 1613, 1581, 1549, 1518, 2619, 2526, 2437, 2350, 2267, 2187, 2109, 2035, 1963, 1893, 1826, 1762, 1442, 1399, 1357, 1316, 1277, 1238, 1201, 1165, 1130, 1096, 1063, 1031, 1000, 624, 612, 600, 589, 577, 566, 555, 590, 980, 945, 912, 879, 848, 818, 789, 761, 734, 708, 683, 658, 635, 114, 113, 113, 112, 111, 110, 110, 109, 108, 107, 107, 106, 105, 105, 420, 409, 398, 387, 377, 367, 357, 347, 338, 329, 320, 312, 303, 295, 287, 90, 89, 89, 88, 87, 86, 86, 85, 84, 83, 83, 82, 101, 100, 99, 98, 97, 96, 95, 94, 93, 92, 91, 211, 205, 200, 195, 190, 185, 181, 176, 172, 167, 184, 178, 173, 169, 164, 159, 155, 150, 79, 78, 77, 75, 74, 73, 72, 71, 38, 38, 38, 37, 37, 37, 36, 36, 36, 15, 15, 15, 15, 15, 15, 14, 14, 31, 31, 31, 30, 30, 30, 30, 42, 42, 41, 41, 40, 40, 39, 39, 117, 113, 109, 106, 102, 99, 96, 92, 89, 86, 84, 80, 77, 75, 72, 70, 68, 65, 63, 61, 59, 57, 55, 54, 21, 21, 20, 20, 20, 20, 19, 19, 19, 19, 18, 18, 18, 29, 28, 28, 27, 27, 26, 26, 25, 24, 24, 23, 23, 22, 22, 19, 19, 18, 18, 18, 17, 17, 17, 871};
	        final List<Cloudlet> list = new ArrayList<>(); //Put Cloudlet list here
	        for(int i=0; i<this.CLOUDLETS;i++) {
	        	Cloudlet cloudlet =
		                new CloudletSimple(i, cLength[i], CLOUDLET_PES)
		                    .setFileSize(1024)
		                    .setOutputSize(1024)
		                    .setUtilizationModel(new UtilizationModelFull());
	        	list.add(cloudlet);
	        	count++;
	        }
	        System.out.print("\ncount cloudlet: "+count);
	    	/*final List<Cloudlet> list = new ArrayList<>();
	        UtilizationModel utilization = new UtilizationModelFull();
	        long taskLength =this.CLOUDLET_LENGTH;
	        int cloudletNo = this.CLOUDLETS;
	        int i=0;
	        while (taskLength >0) {
	        	System.out.println("TaskLength" + taskLength);
	        	
	        	if(i<cloudletNo-1 && taskLength>=10)	{
	        		//long  length = (long)(Math.random()*taskLength);
	        		UniformDistr rand = new UniformDistr (0, taskLength);
	        		long length = (long)(rand.sample()/4);
		        	while (length ==0) {
		        		length = (long)(rand.sample()/4);
		        	}
		        	Cloudlet cloudlet =
		                new CloudletSimple(i, length, CLOUDLET_PES)
		                    .setFileSize(1024)
		                    .setOutputSize(1024)
		                    .setUtilizationModel(utilization);
	        		list.add(cloudlet);
	        		taskLength= taskLength - length;
	        		
	        		System.out.println("process"+length);
	        	}else if(i==cloudletNo || taskLength<10) {
	        		long length1 = taskLength;
	        		Cloudlet cloudlet =
	                new CloudletSimple(i, length1, CLOUDLET_PES)
	                    .setFileSize(1024)
	                    .setOutputSize(1024)
	                    .setUtilizationModel(utilization);
	        		list.add(cloudlet);
	        		taskLength= taskLength - length1;
	        		System.out.println("process"+length1);
	        	}
	        	
	            
	        i++;
	        
	        //cloudletNo--;
	        }*/
	        return list;
	    }
/**
	     * Creates a list of Cloudlets.
	     */
Creates a list of Cloudlets.
Creates a list of Cloudlets .
private List<Cloudlet> createCloudlets() {
	    	int count=0;
	    	int[] cLength= {12577, 11063, 11985, 11633, 11291, 10960, 10638, 6964, 6827, 6691, 6559, 1272, 1267, 1262, 1257, 4725, 4655, 4587, 4519, 4876, 4797, 4719, 4643, 5449, 5344, 5240, 5139, 2858, 2827, 2796, 2765, 2501, 2476, 2451, 2426, 2402, 2378, 9161, 8804, 8461, 8132, 7815, 7511, 7218, 4252, 4151, 4051, 3955, 3860, 3768, 3678, 2867, 2813, 2759, 2706, 2677, 2625, 2575, 2525, 2477, 2429, 3474, 3377, 3282, 3190, 2441, 2387, 2335, 2283, 2233, 2183, 2135, 2088, 1859, 1822, 1785, 1750, 1714, 1680, 1646, 1613, 1581, 1549, 1518, 2619, 2526, 2437, 2350, 2267, 2187, 2109, 2035, 1963, 1893, 1826, 1762, 1442, 1399, 1357, 1316, 1277, 1238, 1201, 1165, 1130, 1096, 1063, 1031, 1000, 624, 612, 600, 589, 577, 566, 555, 590, 980, 945, 912, 879, 848, 818, 789, 761, 734, 708, 683, 658, 635, 114, 113, 113, 112, 111, 110, 110, 109, 108, 107, 107, 106, 105, 105, 420, 409, 398, 387, 377, 367, 357, 347, 338, 329, 320, 312, 303, 295, 287, 90, 89, 89, 88, 87, 86, 86, 85, 84, 83, 83, 82, 101, 100, 99, 98, 97, 96, 95, 94, 93, 92, 91, 211, 205, 200, 195, 190, 185, 181, 176, 172, 167, 184, 178, 173, 169, 164, 159, 155, 150, 79, 78, 77, 75, 74, 73, 72, 71, 38, 38, 38, 37, 37, 37, 36, 36, 36, 15, 15, 15, 15, 15, 15, 14, 14, 31, 31, 31, 30, 30, 30, 30, 42, 42, 41, 41, 40, 40, 39, 39, 117, 113, 109, 106, 102, 99, 96, 92, 89, 86, 84, 80, 77, 75, 72, 70, 68, 65, 63, 61, 59, 57, 55, 54, 21, 21, 20, 20, 20, 20, 19, 19, 19, 19, 18, 18, 18, 29, 28, 28, 27, 27, 26, 26, 25, 24, 24, 23, 23, 22, 22, 19, 19, 18, 18, 18, 17, 17, 17, 871};
	        final List<Cloudlet> list = new ArrayList<>(); 
	        for(int i=0; i<this.CLOUDLETS;i++) {
	        	Cloudlet cloudlet =
		                new CloudletSimple(i, cLength[i], CLOUDLET_PES)
		                    .setFileSize(1024)
		                    .setOutputSize(1024)
		                    .setUtilizationModel(new UtilizationModelFull());
	        	list.add(cloudlet);
	        	count++;
	        }
	        System.out.print("\ncount cloudlet: "+count);
	    	/*final List<Cloudlet> list = new ArrayList<>();
	        UtilizationModel utilization = new UtilizationModelFull();
	        long taskLength =this.CLOUDLET_LENGTH;
	        int cloudletNo = this.CLOUDLETS;
	        int i=0;
	        while (taskLength >0) {
	        	System.out.println("TaskLength" + taskLength);
	        	if(i<cloudletNo-1 && taskLength>=10)	{
	        		//long  length = (long)(Math.random()*taskLength);
	        		UniformDistr rand = new UniformDistr (0, taskLength);
	        		long length = (long)(rand.sample()/4);
		        	while (length ==0) {
		        		length = (long)(rand.sample()/4);
		        	}
		        	Cloudlet cloudlet =
		                new CloudletSimple(i, length, CLOUDLET_PES)
		                    .setFileSize(1024)
		                    .setOutputSize(1024)
		                    .setUtilizationModel(utilization);
	        		list.add(cloudlet);
	        		taskLength= taskLength - length;
	        		System.out.println("process"+length);
	        	}else if(i==cloudletNo || taskLength<10) {
	        		long length1 = taskLength;
	        		Cloudlet cloudlet =
	                new CloudletSimple(i, length1, CLOUDLET_PES)
	                    .setFileSize(1024)
	                    .setOutputSize(1024)
	                    .setUtilizationModel(utilization);
	        		list.add(cloudlet);
	        		taskLength= taskLength - length1;
	        		System.out.println("process"+length1);
	        	}
	        i++;
	        //cloudletNo--;
	        }*/
	        return list;
	    }
private List < Cloudlet > createCloudlets ( ) { int count = 0 ; int [ ] cLength = { 12577 , 11063 , 11985 , 11633 , 11291 , 10960 , 10638 , 6964 , 6827 , 6691 , 6559 , 1272 , 1267 , 1262 , 1257 , 4725 , 4655 , 4587 , 4519 , 4876 , 4797 , 4719 , 4643 , 5449 , 5344 , 5240 , 5139 , 2858 , 2827 , 2796 , 2765 , 2501 , 2476 , 2451 , 2426 , 2402 , 2378 , 9161 , 8804 , 8461 , 8132 , 7815 , 7511 , 7218 , 4252 , 4151 , 4051 , 3955 , 3860 , 3768 , 3678 , 2867 , 2813 , 2759 , 2706 , 2677 , 2625 , 2575 , 2525 , 2477 , 2429 , 3474 , 3377 , 3282 , 3190 , 2441 , 2387 , 2335 , 2283 , 2233 , 2183 , 2135 , 2088 , 1859 , 1822 , 1785 , 1750 , 1714 , 1680 , 1646 , 1613 , 1581 , 1549 , 1518 , 2619 , 2526 , 2437 , 2350 , 2267 , 2187 , 2109 , 2035 , 1963 , 1893 , 1826 , 1762 , 1442 , 1399 , 1357 , 1316 , 1277 , 1238 , 1201 , 1165 , 1130 , 1096 , 1063 , 1031 , 1000 , 624 , 612 , 600 , 589 , 577 , 566 , 555 , 590 , 980 , 945 , 912 , 879 , 848 , 818 , 789 , 761 , 734 , 708 , 683 , 658 , 635 , 114 , 113 , 113 , 112 , 111 , 110 , 110 , 109 , 108 , 107 , 107 , 106 , 105 , 105 , 420 , 409 , 398 , 387 , 377 , 367 , 357 , 347 , 338 , 329 , 320 , 312 , 303 , 295 , 287 , 90 , 89 , 89 , 88 , 87 , 86 , 86 , 85 , 84 , 83 , 83 , 82 , 101 , 100 , 99 , 98 , 97 , 96 , 95 , 94 , 93 , 92 , 91 , 211 , 205 , 200 , 195 , 190 , 185 , 181 , 176 , 172 , 167 , 184 , 178 , 173 , 169 , 164 , 159 , 155 , 150 , 79 , 78 , 77 , 75 , 74 , 73 , 72 , 71 , 38 , 38 , 38 , 37 , 37 , 37 , 36 , 36 , 36 , 15 , 15 , 15 , 15 , 15 , 15 , 14 , 14 , 31 , 31 , 31 , 30 , 30 , 30 , 30 , 42 , 42 , 41 , 41 , 40 , 40 , 39 , 39 , 117 , 113 , 109 , 106 , 102 , 99 , 96 , 92 , 89 , 86 , 84 , 80 , 77 , 75 , 72 , 70 , 68 , 65 , 63 , 61 , 59 , 57 , 55 , 54 , 21 , 21 , 20 , 20 , 20 , 20 , 19 , 19 , 19 , 19 , 18 , 18 , 18 , 29 , 28 , 28 , 27 , 27 , 26 , 26 , 25 , 24 , 24 , 23 , 23 , 22 , 22 , 19 , 19 , 18 , 18 , 18 , 17 , 17 , 17 , 871 } ; final List < Cloudlet > list = new ArrayList < > ( ) ; for ( int i = 0 ; i < this . CLOUDLETS ; i ++ ) { Cloudlet cloudlet = new CloudletSimple ( i , cLength [ i ] , CLOUDLET_PES ) . setFileSize ( 1024 ) . setOutputSize ( 1024 ) . setUtilizationModel ( new UtilizationModelFull ( ) ) ; list . add ( cloudlet ) ; count ++ ; } System . out . print ( "\ncount cloudlet: " + count ) ; /*final List<Cloudlet> list = new ArrayList<>();
	        UtilizationModel utilization = new UtilizationModelFull();
	        long taskLength =this.CLOUDLET_LENGTH;
	        int cloudletNo = this.CLOUDLETS;
	        int i=0;
	        while (taskLength >0) {
	        	System.out.println("TaskLength" + taskLength);
	        	
	        	if(i<cloudletNo-1 && taskLength>=10)	{
	        		//long  length = (long)(Math.random()*taskLength);
	        		UniformDistr rand = new UniformDistr (0, taskLength);
	        		long length = (long)(rand.sample()/4);
		        	while (length ==0) {
		        		length = (long)(rand.sample()/4);
		        	}
		        	Cloudlet cloudlet =
		                new CloudletSimple(i, length, CLOUDLET_PES)
		                    .setFileSize(1024)
		                    .setOutputSize(1024)
		                    .setUtilizationModel(utilization);
	        		list.add(cloudlet);
	        		taskLength= taskLength - length;
	        		
	        		System.out.println("process"+length);
	        	}else if(i==cloudletNo || taskLength<10) {
	        		long length1 = taskLength;
	        		Cloudlet cloudlet =
	                new CloudletSimple(i, length1, CLOUDLET_PES)
	                    .setFileSize(1024)
	                    .setOutputSize(1024)
	                    .setUtilizationModel(utilization);
	        		list.add(cloudlet);
	        		taskLength= taskLength - length1;
	        		System.out.println("process"+length1);
	        	}
	        	
	            
	        i++;
	        
	        //cloudletNo--;
	        }*/ return list ; }
Creates a list of Cloudlets.
Creates a list of Cloudlets .
//Put Cloudlet list here