Skip to content
Snippets Groups Projects

Dynamic parameters in solver genetic

Merged Andrii Zakharchuk requested to merge automic_geneticGenerealParam into autonomic_genetic
All threads resolved!
1 file
+ 26
2
Compare changes
  • Side-by-side
  • Inline
@@ -63,10 +63,34 @@ public class GeneticMain {
int generations = 200000;
int populationSize = 1000;
if (args.length == 2) {
System.out.println("============ Args: " + args[0] + " and " + args[1]);
logger.debug("============ Args: " + args[0] + " and " + args[1]);
generations = Integer.parseInt(args[0]);
populationSize = Integer.parseInt(args[1]);
System.out.println("============ generations = " + generations + ", populationSize = " + populationSize);
logger.debug("============ generations = " + generations + ", populationSize = " + populationSize);
} else if (args.length == 15){
logger.debug("============ Args: " + String.join("and",args));
generations = Integer.parseInt(args[0]);
populationSize = Integer.parseInt(args[1]);
numTopLevelComponents = Integer.parseInt(args[2]);
avgNumImplSubComponents = Integer.parseInt(args[3]);
implSubComponentStdDerivation = Integer.parseInt(args[4]);
avgNumCompSubComponents = Integer.parseInt(args[5]);
compSubComponentStdDerivation = Integer.parseInt(args[6]);
componentDepth = Integer.parseInt(args[7]);
numImplementations = Integer.parseInt(args[8]);
excessComputeResourceRatio = Double.parseDouble(args[9]);
numRequests = Integer.parseInt(args[10]);
numCpus = Integer.parseInt(args[11]);
seed = Integer.parseInt(args[12]);
timeoutValue = Integer.parseInt(args[13]);
timeoutUnit = args[14];
logger.debug( String.format("============ generations = %d populationSize = %d numTopLevelComponents = %d" +
" avgNumImplSubComponents = %d implSubComponentStdDerivation = %d avgNumCompSubComponents = %d compSubComponentStdDerivation = %d componentDepth = %d" +
" numImplementations = %d excessComputeResourceRatio = %f numRequests = %d numCpus = %d seed = %d timeoutValue = %d timeoutUnit = %s",
generations, populationSize,numTopLevelComponents, avgNumImplSubComponents,
implSubComponentStdDerivation, avgNumCompSubComponents,compSubComponentStdDerivation, componentDepth,numImplementations,
excessComputeResourceRatio,numRequests, numCpus,
seed, timeoutValue,timeoutUnit));
}
ScenarioGenerator generator = new ScenarioGenerator(new ScenarioDescription(numTopLevelComponents,
Loading