Skip to content
Snippets Groups Projects
Commit e7f6d509 authored by Dimitrii's avatar Dimitrii
Browse files

Merge branch 'automic_geneticGenerealParam' into 'autonomic_genetic'

Dynamic parameters in solver genetic

See merge request !1
parents b6e62b7c 08c85e28
Branches
No related tags found
1 merge request!1Dynamic parameters in solver genetic
......@@ -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,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment