Package sfc_ft_b
Class GA_b
java.lang.Object
sfc_ft_b.GA_b
public class GA_b
extends java.lang.Object
Parameter Adjustment Genetic Algorithm
-
Field Summary
Fields Modifier and Type Field Description Best_bbestpreserves best solution on each stage(package private) intchromesPAGA parameter, even numbers only(package private) services.VNFgraphcnet(package private) java.lang.String[]commandapply command to OS(package private) doublecrossprobcrossover probability(package private) doubledifrange of fitness in population(package private) booleanfirstindicates the generation of first populationGA_cga_c(package private) intgenerationsPAGA parameter, even numbers only(package private) intknumber of parameters(package private) Best_blastbestpreserves latest best solution(package private) int[]mappingmapping of parameter values to the command to OS(package private) doublemaxminimum, maximum fitness(package private) doubleminminimum, maximum fitness(package private) doublemutprobmutation probability(package private) java.lang.Stringobjectiveset to min or max(package private) int[][]parameter_domparameter domains(package private) java.lang.String[]paramsparameter names(package private) network.FTnetworkpnet(package private) Chromosome_b[]poppopulation arrays(package private) Chromosome_b[]pop2population arrays(package private) Chromosome_b[]popspopulation arrays(package private) Chromosome_b[]pops2population arrays(package private) intsupergenPAGA supergeneration parameter, even numbers only set supergen=1 for simple GA configuration -
Constructor Summary
-
Method Summary
Modifier and Type Method Description private voidcrossover()Crossovervoidgenchromefit(Chromosome_b h)compute and store fitness of a single chromosomevoidgenfit()computes and stores the fitness of each cromosomevoidgenfit1()computes fitness for popvoidgenfit2()compute fitness for population generated by crossover and mutation (pop2)voidgenpop()determines the nodes that will be used for population generationvoidinit()Initialize structure of procedures in PAGAvoidinit2()execute genetic procedures for current generationvoidinitializebest()initialize the object that stores the best solution in each team and groupvoidinitializelastbest()initialize the object that stores the best overall solutionprivate voidmutation()Mutationvoidprintbest()print current generation best solutionvoidprintlastbest()print current overall best solutionvoidprintpop()prints population of the current generationprivate voidrange()computes the range in the fitness of the populationprivate voidselection()Selectionvoidsuperbest(int in)stores the best solution of the current generation for the next stage of the algorithmvoidsuperbest2(int in)stores the best solution of the current generation for the next stage of the algorithmvoidupdatebest()update best solutionvoidupdatebestmax()update best solution when the objective is the maximizationvoidupdatebestmin()update best solution when the objective is the minimizationMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Field Details
-
chromes
int chromesPAGA parameter, even numbers only -
generations
int generationsPAGA parameter, even numbers only -
supergen
int supergenPAGA supergeneration parameter, even numbers only set supergen=1 for simple GA configuration -
pop
Chromosome_b[] poppopulation arrays -
pop2
Chromosome_b[] pop2population arrays -
pops
Chromosome_b[] popspopulation arrays -
pops2
Chromosome_b[] pops2population arrays -
k
int knumber of parameters -
params
java.lang.String[] paramsparameter names -
parameter_dom
int[][] parameter_domparameter domains -
command
java.lang.String[] commandapply command to OS -
objective
java.lang.String objectiveset to min or max -
best
preserves best solution on each stage -
lastbest
Best_b lastbestpreserves latest best solution -
min
double minminimum, maximum fitness -
max
double maxminimum, maximum fitness -
dif
double difrange of fitness in population -
crossprob
double crossprobcrossover probability -
mutprob
double mutprobmutation probability -
first
boolean firstindicates the generation of first population -
mapping
int[] mappingmapping of parameter values to the command to OS -
pnet
network.FTnetwork pnet -
cnet
services.VNFgraph cnet -
ga_c
-
-
Constructor Details
-
GA_b
public GA_b(int chroms, int gnrs, int sgnrs, java.lang.String[] params, java.lang.String[] command, double crossprop, double mutprop, int[][] parameter_dom, java.lang.String objective, services.VNFgraph cnet, network.FTnetwork pnet) -
GA_b
public GA_b()
-
-
Method Details
-
init
public void init()Initialize structure of procedures in PAGA -
init2
public void init2()execute genetic procedures for current generation -
selection
private void selection()Selection -
crossover
private void crossover()Crossover -
mutation
private void mutation()Mutation -
genpop
public void genpop()determines the nodes that will be used for population generation -
initializebest
public void initializebest()initialize the object that stores the best solution in each team and group -
initializelastbest
public void initializelastbest()initialize the object that stores the best overall solution -
printpop
public void printpop()prints population of the current generation -
superbest
public void superbest(int in)stores the best solution of the current generation for the next stage of the algorithm -
superbest2
public void superbest2(int in)stores the best solution of the current generation for the next stage of the algorithm -
genfit
public void genfit()computes and stores the fitness of each cromosome -
genfit1
public void genfit1()computes fitness for pop -
genfit2
public void genfit2()compute fitness for population generated by crossover and mutation (pop2) -
genchromefit
compute and store fitness of a single chromosome -
range
private void range()computes the range in the fitness of the population -
updatebest
public void updatebest()update best solution -
updatebestmin
public void updatebestmin()update best solution when the objective is the minimization -
updatebestmax
public void updatebestmax()update best solution when the objective is the maximization -
printlastbest
public void printlastbest()print current overall best solution -
printbest
public void printbest()print current generation best solution
-