public class MGACovWeightRouting extends MGAWeightRouting
Summary of the algorithm:
To reduce the simulation time, the solutions are not simulated with less than the normal number of replications. Then only the good solution candidates are re-simulated with the normal number of replications.
This version puts more weight to the best solution in population to keep
(not the overall best solution) and the also use the covariance of the variables
of the elite population.
The user can set to ignore the covariance (set to covariance to 0) if the correlation
is below some given level.
This is an extension to MGAWeightRouting
where the covariance is also used
in the generation of the population.
AbstractMGAWeightRouting.Results
Modifier and Type | Field and Description |
---|---|
protected double |
correlationThreshold
Set the correlation threshold so that low absolute correlation are ignored.
|
initCoefStd, initConstStd, positiveConstantWeights, positiveTimeCoeffs, router
bestResults, bestSolPopRatio, canServe, cc, initUserParams, initUserParamsStdRatio, lastRunTimeSec, maxIt, maxNoImprIt, mgaSmoothing, mgaSmoothingRatio, normalDistMinStd, numDimensions, numGroups, numNormalRatio, numTypes, objFunc, popKeep, popSize, rs, sim, simRepRatio, skillList, timeLimitSec, tol, totalNumSkills
Constructor and Description |
---|
MGACovWeightRouting(CallCenterSim sim,
RoutingObjectiveFunc objFunc) |
Modifier and Type | Method and Description |
---|---|
double[][] |
convertCovarToCorr(double[][] covar) |
double |
getCorrelationThreshold()
Get the correlation threshold.
|
static void |
main(String[] args) |
void |
optimize(int popSize,
int popKeep,
int maxIt,
int maxNoImprIt,
double tol)
Execute the modified genetic algorithm optimization.
|
protected void |
printExtraInitialParameters()
Method can be overridden to print extra initial parameters.
|
void |
printMatrix(double[][] d) |
void |
printMatrix(double[][] d,
int n)
Print the matrix d with the number of decimal n.
|
void |
setCorrelationThreshold(double t)
Set the correlation threshold value so that that variables with
correlation with absolute value below
this threshold t have their covariance set to 0.
|
computeNumDimensions, eval, exportSolution, generateSolution, getBestCallCoeffs, getBestConstWeights, getBestGroupCoeffs, getCallCoeffs, getConstWeights, getGroupCoeffs, getInitCoefStd, getInitConstStd, getPositiveConstantWeights, getPositiveTimeCoeffs, initializeMean, initializeStd, isSolutionValid, printOptimalSolution, restrictToPositiveValues, setInitCoefStd, setInitConstStd, setPositiveConstantWeights, setPositiveTimeCoeffs, setRouter
getBestResults, getBestScore, getBestSolPopRatio, getInitUserParams, getInitUserParamsStdRatio, getLastRunTimeSec, getMGASmoothing, getMGASmoothingRatio, getNumNormalRatio, getRandomStream, getSimRepRatio, getSkillList, getTimeLimitSec, getTotalNumSkills, setBestSolPopRatio, setInitUserParams, setInitUserParamsStdRatio, setMGASmoothing, setMGASmoothingRatio, setNumNormalRatio, setRandomStream, setSimRepRatio, setTimeLimitSec, updateBestResults
protected double correlationThreshold
public MGACovWeightRouting(CallCenterSim sim, RoutingObjectiveFunc objFunc)
public void setCorrelationThreshold(double t)
t
- the correlation threshold.public double getCorrelationThreshold()
public void optimize(int popSize, int popKeep, int maxIt, int maxNoImprIt, double tol)
AbstractMGAWeightRouting
optimize
in class AbstractMGAWeightRouting
popSize
- the population size at each iteration.popKeep
- the number of solutions to keep in each iteration.maxIt
- the maximum number of iterations.maxNoImprIt
- stopping condition: the maximum number of consecutive iterations without improving
the quantile cost (cost of the most expensive elite solution).tol
- the convergence threshold of the standard variation, the
algorithm stops when all the standard variations are below this level.protected void printExtraInitialParameters()
AbstractMGAWeightRouting
int, int, int, double)
will print the initial parameters
of the optimization function and those present in this abstract class.
But the user can print additional informations with this method.
This method is called before executing the optimization, right after
printing the initial parameters of this abstract class.printExtraInitialParameters
in class MGAWeightRouting
public void printMatrix(double[][] d)
public void printMatrix(double[][] d, int n)
d
- the matrixn
- the number of decimal to print.public double[][] convertCovarToCorr(double[][] covar)