public class MGAWeightRoutingThreshold extends MGAWeightRouting
This initial values for the idle agent threshold should be small (like 1). The minimum initial standard deviation value is 1.
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.
The structure of the solution is: [constant weights, call coefficients, group idle time coefficients, thresholds].
AbstractMGAWeightRouting.Results
Modifier and Type | Field and Description |
---|---|
protected double |
initThresholdMean
Initial mean for the threshold variables.
|
protected double |
initThresholdStd
Initial standard deviation for the threshold variables.
|
protected WeightRoutingThreshold.WeightRouterThreshold |
router |
initCoefStd, initConstStd, positiveConstantWeights, positiveTimeCoeffs
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 |
---|
MGAWeightRoutingThreshold(CallCenterSim sim,
RoutingObjectiveFunc objFunc) |
Modifier and Type | Method and Description |
---|---|
protected int |
computeNumDimensions()
Internal method to return the number of dimensions of the problem
(or the number of variables to optimize).
|
double |
eval(double[] x)
Evaluate the solution and return the cost from the objective function.
|
void |
exportSolution(String outputFn)
Exports the best weight routing solution found to a new
call center XML parameter file.
|
protected double[] |
generateSolution(double[] mean,
double[] std)
Generate a solution from a normal distribution with the given mean and
standard deviation.
|
double[][] |
getBestMinIdleAgents()
Get the minIdleAgentsGT matrix of the best solution found.
|
double |
getInitThresholdMean()
Returns the initial mean for the threshold parameters.
|
double |
getInitThresholdStd()
Get the initial standard deviation for the threshold parameters.
|
double[][] |
getMinIdleAgents(double[] x)
Extracts the minimum idle agent threshold matrix from the given solution vector.
|
protected double[] |
initializeMean()
Creates a vector that contains the initial mean parameters of the distributions used in the MGA.
|
protected double[] |
initializeStd()
Creates a vector that contains the initial standard deviation parameters of the distributions used in the MGA.
|
static void |
main(String[] args) |
protected void |
printExtraInitialParameters()
Method can be overridden to print extra initial parameters.
|
protected void |
printOptimalSolution(double[] x)
Method can be overridden to print the optimal solution.
|
void |
setInitThresholdMean(double t)
Sets the initial mean for the threshold parameters.
|
void |
setInitThresholdStd(double t)
Sets the initial standard deviation for the threshold parameters.
|
protected void |
setRouter()
Internal method to set the router.
|
getBestCallCoeffs, getBestConstWeights, getBestGroupCoeffs, getCallCoeffs, getConstWeights, getGroupCoeffs, getInitCoefStd, getInitConstStd, getPositiveConstantWeights, getPositiveTimeCoeffs, isSolutionValid, restrictToPositiveValues, setInitCoefStd, setInitConstStd, setPositiveConstantWeights, setPositiveTimeCoeffs
getBestResults, getBestScore, getBestSolPopRatio, getInitUserParams, getInitUserParamsStdRatio, getLastRunTimeSec, getMGASmoothing, getMGASmoothingRatio, getNumNormalRatio, getRandomStream, getSimRepRatio, getSkillList, getTimeLimitSec, getTotalNumSkills, optimize, setBestSolPopRatio, setInitUserParams, setInitUserParamsStdRatio, setMGASmoothing, setMGASmoothingRatio, setNumNormalRatio, setRandomStream, setSimRepRatio, setTimeLimitSec, updateBestResults
protected WeightRoutingThreshold.WeightRouterThreshold router
protected double initThresholdMean
protected double initThresholdStd
public MGAWeightRoutingThreshold(CallCenterSim sim, RoutingObjectiveFunc objFunc)
protected void setRouter()
MGAWeightRouting
setRouter
in class MGAWeightRouting
protected int computeNumDimensions()
MGAWeightRouting
computeNumDimensions
in class MGAWeightRouting
public void setInitThresholdMean(double t)
t
- the initial mean for the threshold parameterspublic double getInitThresholdMean()
public void setInitThresholdStd(double t)
t
- the initial standard deviation for the threshold parameterspublic double getInitThresholdStd()
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
protected double[] initializeMean()
MGAWeightRouting
initializeMean
in class MGAWeightRouting
protected double[] initializeStd()
MGAWeightRouting
initializeStd
in class MGAWeightRouting
protected void printOptimalSolution(double[] x)
AbstractMGAWeightRouting
printOptimalSolution
in class MGAWeightRouting
x
- the solution vector to printprotected double[] generateSolution(double[] mean, double[] std)
AbstractMGAWeightRouting
generateSolution
in class MGAWeightRouting
mean
- the mean of each variable.std
- the standard deviation of each variable.public double[][] getMinIdleAgents(double[] x)
x
- the solution vectorpublic double eval(double[] x)
AbstractMGAWeightRouting
eval
in class MGAWeightRouting
x
- the solutionpublic double[][] getBestMinIdleAgents()
public void exportSolution(String outputFn)
MGAWeightRouting
exportSolution
in class MGAWeightRouting
outputFn
- filename of the XML file to create.