public static void main(String[] args) { System.out.println("SPGA2_forParallel 20060302 Mining Gene Clone Mating with Archive"); int numberOfSubPopulations[] = new int[] {40}; // 10, 20, 30, 40 int popSize[] = new int[] {210}; // 100, 155, 210 int numberOfJob[] = new int[] {35, 50, 65}; // 35, 50, 65 int numberOfMachines[] = new int[] {10, 15, 18}; // 10, 15, 18 int totalSolnsToExamine[] = new int[] {1000000}; // 1000000, 1500000, 2000000 boolean applySecCRX[] = new boolean[] {false}; // false, true boolean applySecMutation[] = new boolean[] {true}; boolean applyClone[] = new boolean[] {false, true}; int tournamentSize[] = new int[] {10}; // 2, 10 int cloneStrategies[] = new int[] {2}; // 0: random, 1: swap, 2:inverse, 3:shift, 4:adjacent.0, 1, 2, 3, 4 double timeToClone[] = new double[] {0}; // 0, 0.25, 0.5, 0.75 double crossoverRate = 0.9, mutationRate = 0.1, elitism = 0.2; int repeatExperiments = 15; int counter = 0; /* for(int i = 0 ; i < repeatExperiments ; i ++ ){ for(int j = 0 ; j < applyClone.length ; j ++ ){ for(int k = 0 ; k < tournamentSize.length ; k ++ ){ for(int r = 0 ; r < numberOfJob.length ; r ++ ){ System.out.println("combinations: "+counter++); SPGA2_forParallelMachine SPGA2_forParallelMachine1 = new SPGA2_forParallelMachine(); SPGA2_forParallelMachine1.setParallelMachineData(numberOfJob[r], numberOfMachines[r]); SPGA2_forParallelMachine1.setParameters(numberOfSubPopulations[0], popSize[0], totalSolnsToExamine[0], crossoverRate, mutationRate, elitism, applySecCRX[0], applySecMutation[0]); SPGA2_forParallelMachine1.setCloneActive(applyClone[j]); SPGA2_forParallelMachine1.setTournamentSize(tournamentSize[k]); SPGA2_forParallelMachine1.initiateVars(); SPGA2_forParallelMachine1.start(); SPGA2_forParallelMachine1 = null; System.gc(); } } } }// end i for(int i = 0 ; i < repeatExperiments ; i ++ ){ for(int j = 0 ; j < numberOfJob.length ; j ++ ){ for(int r = 0 ; r < cloneStrategies.length ; r ++ ){ for(int k = 0 ; k < timeToClone.length ; k ++ ){ System.out.println("combinations: "+counter++); SPGA2_forParallelMachine SPGA2_forParallelMachine1 = new SPGA2_forParallelMachine(); SPGA2_forParallelMachine1.setParallelMachineData(numberOfJob[j], numberOfMachines[j]); SPGA2_forParallelMachine1.setParameters(numberOfSubPopulations[0], popSize[0], totalSolnsToExamine[0], crossoverRate, mutationRate, elitism, applySecCRX[0], applySecMutation[0]); SPGA2_forParallelMachine1.setCloneActive(applyClone[0], cloneStrategies[r]); SPGA2_forParallelMachine1.setTournamentSize(tournamentSize[0]); SPGA2_forParallelMachine1.initiateVars(); SPGA2_forParallelMachine1.setTimeToClone(timeToClone[k]); SPGA2_forParallelMachine1.start(); SPGA2_forParallelMachine1 = null; System.gc(); } } } }// end i */ for (int i = 0; i < repeatExperiments; i++) { for (int r = 0; r < numberOfJob.length; r++) { System.out.println("combinations: " + counter++); SPGA2_forParallelMachine SPGA2_forParallelMachine1 = new SPGA2_forParallelMachine(); SPGA2_forParallelMachine1.setParallelMachineData(numberOfJob[r], numberOfMachines[r]); SPGA2_forParallelMachine1.setParameters( numberOfSubPopulations[0], popSize[0], totalSolnsToExamine[0], crossoverRate, mutationRate, elitism, applySecCRX[0], applySecMutation[0]); SPGA2_forParallelMachine1.setCloneActive(applyClone[0], 2); SPGA2_forParallelMachine1.initiateVars(); SPGA2_forParallelMachine1.start(); SPGA2_forParallelMachine1.setTimeToClone(timeToClone[0]); SPGA2_forParallelMachine1 = null; System.gc(); } // end r } // end i /* for(int i = 0 ; i < repeatExperiments ; i ++ ){ for(int j = 0 ; j < numberOfSubPopulations.length ; j ++ ){ for(int k = 0 ; k < popSize.length ; k ++ ){ for(int L = 0 ; L < applySecCRX.length ; L ++ ){ for(int m = 0 ; m < applySecMutation.length ; m ++ ){ for(int r = 0 ; r < numberOfJob.length ; r ++ ){ System.out.println(numberOfJob[r]+"\t"+numberOfSubPopulations[j]+"\t"+ popSize[k]); System.out.println("combinations: "+counter++); SPGA2_forParallelMachine SPGA2_forParallelMachine1 = new SPGA2_forParallelMachine(); SPGA2_forParallelMachine1.setParallelMachineData(numberOfJob[r], numberOfMachines[r]); SPGA2_forParallelMachine1.setParameters(numberOfSubPopulations[j], popSize[k], totalSolnsToExamine[0], crossoverRate, mutationRate, elitism, applySecCRX[L], applySecMutation[m]); SPGA2_forParallelMachine1.initiateVars(); SPGA2_forParallelMachine1.start(); SPGA2_forParallelMachine1 = null; System.gc(); //System.exit(0); }//end r }//end m }// end L }// end k }// end j }// end i */ System.exit(0); }