|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectAbstractClasses.ProblemDomain
PersonnelScheduling.PersonnelScheduling
public class PersonnelScheduling
Nested Class Summary |
---|
Nested classes/interfaces inherited from class AbstractClasses.ProblemDomain |
---|
ProblemDomain.HeuristicType |
Field Summary |
---|
Fields inherited from class AbstractClasses.ProblemDomain |
---|
depthOfSearch, heuristicCallRecord, heuristicCallTimeRecord, intensityOfMutation, rng |
Constructor Summary | |
---|---|
PersonnelScheduling(long seed)
|
Method Summary | |
---|---|
double |
applyHeuristic(int heuristicID,
int solutionIn,
int solutionOut)
Applies the heuristic specified by heuristicID to the solution at position solutionSourceIndex and places the resulting solution at position solutionDestinationIndex in the solution array. |
double |
applyHeuristic(int heuristicID,
int solIn1,
int solIn2,
int solOut1)
Apply the heuristic specified by heuristicID to the solutions at position solutionSourceIndex1 and position solutionSourceIndex2 and put the resulting solution at position solutionDestinationIndex. |
java.lang.String |
bestSolutionToString()
Gets a String representation of the best solution found so far by the HyperHeuristic. |
boolean |
compareSolutions(int solutionIndex1,
int solutionIndex2)
Compares two solutions in the memory for equality. |
void |
copySolution(int src,
int dest)
Copies a solution from one position in the solution array to another |
double |
getBestSolutionValue()
Returns the objective function value of the best solution found so far by the HyperHeuristic. |
double |
getFunctionValue(int solutionIndex)
Gets the objective function value of the solution at index solutionIndex |
int[] |
getHeuristicsOfType(ProblemDomain.HeuristicType hType)
Gets an array of heuristicIDs of the type specified by heuristicType. |
int[] |
getHeuristicsThatUseDepthOfSearch()
Gets an array of heuristicIDs that use the depthOfSearch parameter |
int[] |
getHeuristicsThatUseIntensityOfMutation()
Gets an array of heuristicIDs that use the intensityOfMutation parameter |
int |
getNumberOfHeuristics()
Gets the number of heuristics available in this problem domain |
int |
getNumberOfInstances()
Gets the number of instances available in this problem domain |
void |
initialiseSolution(int index)
Create an initial solution at a specified position in the memory array. |
void |
loadInstance(int instanceID)
Loads the instance specified by instanceID. |
void |
setMemorySize(int solutionCount)
Sets the size of the array where the solutions are stored. |
java.lang.String |
solutionToString(int solIndex)
Gets a String representation of a given solution in memory |
java.lang.String |
toString()
Gets the name of the problem domain. |
Methods inherited from class AbstractClasses.ProblemDomain |
---|
getDepthOfSearch, getHeuristicCallRecord, getheuristicCallTimeRecord, getIntensityOfMutation, setDepthOfSearch, setIntensityOfMutation |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public PersonnelScheduling(long seed)
Method Detail |
---|
public int getNumberOfHeuristics()
ProblemDomain
getNumberOfHeuristics
in class ProblemDomain
public int[] getHeuristicsOfType(ProblemDomain.HeuristicType hType)
ProblemDomain
getHeuristicsOfType
in class ProblemDomain
hType
- the heuristic type.
public int[] getHeuristicsThatUseDepthOfSearch()
ProblemDomain
getHeuristicsThatUseDepthOfSearch
in class ProblemDomain
public int[] getHeuristicsThatUseIntensityOfMutation()
ProblemDomain
getHeuristicsThatUseIntensityOfMutation
in class ProblemDomain
public double applyHeuristic(int heuristicID, int solIn1, int solIn2, int solOut1)
ProblemDomain
applyHeuristic
in class ProblemDomain
heuristicID
- the heuristic to apply (starts at zero)solOut1
- the position to store the resulting
solutions at
public double applyHeuristic(int heuristicID, int solutionIn, int solutionOut)
ProblemDomain
applyHeuristic
in class ProblemDomain
heuristicID
- The ID of the heuristic to apply (starts at zero)solutionIn
- The index of the solution in the memory array to which to apply the heuristicsolutionOut
- The index in the memory array at which
to store the resulting solution
public int getNumberOfInstances()
ProblemDomain
getNumberOfInstances
in class ProblemDomain
public void setMemorySize(int solutionCount)
ProblemDomain
setMemorySize
in class ProblemDomain
solutionCount
- The new size of the solution array.public double getBestSolutionValue()
ProblemDomain
getBestSolutionValue
in class ProblemDomain
public void loadInstance(int instanceID)
ProblemDomain
loadInstance
in class ProblemDomain
instanceID
- Specifies the instance to load. The ID's
start at zero.public void initialiseSolution(int index)
ProblemDomain
initialiseSolution
in class ProblemDomain
index
- The index of the memory array at which the solution should be initialised.public double getFunctionValue(int solutionIndex)
ProblemDomain
getFunctionValue
in class ProblemDomain
solutionIndex
- The index of the solution from which the objective function is required
public java.lang.String bestSolutionToString()
ProblemDomain
bestSolutionToString
in class ProblemDomain
public java.lang.String solutionToString(int solIndex)
ProblemDomain
solutionToString
in class ProblemDomain
solIndex
- The index of the solution of which a String representation is required
public java.lang.String toString()
ProblemDomain
toString
in class ProblemDomain
public void copySolution(int src, int dest)
ProblemDomain
copySolution
in class ProblemDomain
src
- The position of the solution to copydest
- The position in the array to copy the
solution to.public boolean compareSolutions(int solutionIndex1, int solutionIndex2)
ProblemDomain
compareSolutions
in class ProblemDomain
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |