Package problem.skilodge
Class SkiLodge
java.lang.Object
problem.skilodge.SkiLodge
- All Implemented Interfaces:
Problem
public class SkiLodge extends java.lang.Object implements Problem
The Ski-Lodge Problem.
This class implements the Ski-Lodge problem which is involves assigning weeks to customers in a ski-lodge such that hard constraints regarding the ski-lodge capacity and fire regulation is not violated while all customers are accommodated in a way that reduces the total compensation paid by the ski-lodge to the customers that have their preferences not met.
-
Nested Class Summary
-
Constructor Summary
Constructors Constructor Description SkiLodge(long seed) -
Method Summary
Modifier and Type Method Description doubleapplyHeuristic(int heuristicID, int srcIndex, int desIndex)doubleapplyHeuristic(int heuristicID, int srcIndex1, int srcIndex2, int desIndex)java.lang.StringbestSolutionToString()booleancompareSolutions(int solutionIndex1, int solutionIndex2)voidcopySolution(int srcIndex, int desIndex)doublegetBestSolutionValue()doublegetDepthOfSearch()doublegetFunctionValue(int solutionIndex)int[]getHeuristicsOfType(Problem.HeuristicType heuristicType)doublegetIntensityOfMutation()intgetNumberOfHeuristics()voidinitialiseSolution(int index)booleanisValid(int solutionIndex)voidloadInstance(java.lang.String path)voidsetDepthOfSearch(double searchDepth)voidsetIntensityOfMutation(double mutationIntensity)voidsetMemorySize(int size)java.lang.StringsolutionToString(int solutionIndex)
-
Constructor Details
-
SkiLodge
public SkiLodge(long seed)
-
-
Method Details
-
applyHeuristic
public double applyHeuristic(int heuristicID, int srcIndex, int desIndex)- Specified by:
applyHeuristicin interfaceProblem
-
applyHeuristic
public double applyHeuristic(int heuristicID, int srcIndex1, int srcIndex2, int desIndex)- Specified by:
applyHeuristicin interfaceProblem
-
bestSolutionToString
public java.lang.String bestSolutionToString()- Specified by:
bestSolutionToStringin interfaceProblem
-
compareSolutions
public boolean compareSolutions(int solutionIndex1, int solutionIndex2)- Specified by:
compareSolutionsin interfaceProblem
-
copySolution
public void copySolution(int srcIndex, int desIndex)- Specified by:
copySolutionin interfaceProblem
-
getBestSolutionValue
public double getBestSolutionValue()- Specified by:
getBestSolutionValuein interfaceProblem
-
getDepthOfSearch
public double getDepthOfSearch()- Specified by:
getDepthOfSearchin interfaceProblem
-
getFunctionValue
public double getFunctionValue(int solutionIndex)- Specified by:
getFunctionValuein interfaceProblem
-
getHeuristicsOfType
- Specified by:
getHeuristicsOfTypein interfaceProblem
-
getIntensityOfMutation
public double getIntensityOfMutation()- Specified by:
getIntensityOfMutationin interfaceProblem
-
getNumberOfHeuristics
public int getNumberOfHeuristics()- Specified by:
getNumberOfHeuristicsin interfaceProblem
-
loadInstance
public void loadInstance(java.lang.String path)- Specified by:
loadInstancein interfaceProblem
-
initialiseSolution
public void initialiseSolution(int index)- Specified by:
initialiseSolutionin interfaceProblem
-
isValid
public boolean isValid(int solutionIndex) -
setDepthOfSearch
public void setDepthOfSearch(double searchDepth)- Specified by:
setDepthOfSearchin interfaceProblem
-
setIntensityOfMutation
public void setIntensityOfMutation(double mutationIntensity)- Specified by:
setIntensityOfMutationin interfaceProblem
-
setMemorySize
public void setMemorySize(int size)- Specified by:
setMemorySizein interfaceProblem
-
solutionToString
public java.lang.String solutionToString(int solutionIndex)- Specified by:
solutionToStringin interfaceProblem
-