|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectAbstractClasses.ProblemDomain
FlowShop.FlowShop
public class FlowShop
Implements the permutation flow shop problem domain.
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 | |
---|---|
FlowShop(long seed)
Creates a flow shop domain and creates a new random number generator using the seed provided. |
Method Summary | |
---|---|
double |
applyHeuristic(int llhID,
int solutionSourceIndex,
int solutionTargetIndex)
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 llhID,
int solutionSourceIndex1,
int solutionSourceIndex2,
int solutionTargetIndex)
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 sourceIndex,
int targetIndex)
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 index)
Gets the objective function value of the solution at index solutionIndex |
int[] |
getHeuristicsOfType(ProblemDomain.HeuristicType heuristicType)
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 |
java.lang.Object |
getProblemData(java.lang.String args)
|
void |
initialiseSolution(int targetIndex)
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 size)
Sets the size of the array where the solutions are stored. |
java.lang.String |
solutionToString(int solutionIndex)
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 FlowShop(long seed)
seed
- a random seedMethod Detail |
---|
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 targetIndex)
ProblemDomain
initialiseSolution
in class ProblemDomain
targetIndex
- The index of the memory array at which the solution should be initialised.public void setMemorySize(int size)
ProblemDomain
setMemorySize
in class ProblemDomain
size
- The new size of the solution array.public int[] getHeuristicsOfType(ProblemDomain.HeuristicType heuristicType)
ProblemDomain
getHeuristicsOfType
in class ProblemDomain
heuristicType
- the heuristic type.
public int[] getHeuristicsThatUseDepthOfSearch()
ProblemDomain
getHeuristicsThatUseDepthOfSearch
in class ProblemDomain
public int[] getHeuristicsThatUseIntensityOfMutation()
ProblemDomain
getHeuristicsThatUseIntensityOfMutation
in class ProblemDomain
public double getBestSolutionValue()
ProblemDomain
getBestSolutionValue
in class ProblemDomain
public double getFunctionValue(int index)
ProblemDomain
getFunctionValue
in class ProblemDomain
index
- The index of the solution from which the objective function is required
public double applyHeuristic(int llhID, int solutionSourceIndex, int solutionTargetIndex)
ProblemDomain
applyHeuristic
in class ProblemDomain
llhID
- The ID of the heuristic to apply (starts at zero)solutionSourceIndex
- The index of the solution in the memory array to which to apply the heuristicsolutionTargetIndex
- The index in the memory array at which
to store the resulting solution
public double applyHeuristic(int llhID, int solutionSourceIndex1, int solutionSourceIndex2, int solutionTargetIndex)
ProblemDomain
applyHeuristic
in class ProblemDomain
llhID
- the heuristic to apply (starts at zero)solutionTargetIndex
- the position to store the resulting
solutions at
public void copySolution(int sourceIndex, int targetIndex)
ProblemDomain
copySolution
in class ProblemDomain
sourceIndex
- The position of the solution to copytargetIndex
- The position in the array to copy the
solution to.public int getNumberOfHeuristics()
ProblemDomain
getNumberOfHeuristics
in class ProblemDomain
public java.lang.String solutionToString(int solutionIndex)
ProblemDomain
solutionToString
in class ProblemDomain
solutionIndex
- The index of the solution of which a String representation is required
public java.lang.String toString()
ProblemDomain
toString
in class ProblemDomain
public java.lang.String bestSolutionToString()
ProblemDomain
bestSolutionToString
in class ProblemDomain
public int getNumberOfInstances()
ProblemDomain
getNumberOfInstances
in class ProblemDomain
public java.lang.Object getProblemData(java.lang.String args)
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 |