Module org.cicirello.chips_n_salsa
Package org.cicirello.search.problems
Interface Problem<T extends Copyable<T>>
-
- Type Parameters:
T
- The type of object used to represent candidate solutions to the problem.
- All Known Subinterfaces:
IntegerCostOptimizationProblem<T>
,OptimizationProblem<T>
,SingleMachineSchedulingProblem
- All Known Implementing Classes:
BaseTSP
,BinPacking
,BinPacking.Triplet
,BinPacking.UniformRandom
,BoundMax
,CostFunctionScaler
,ForresterEtAl2008
,GramacyLee2012
,HollandRoyalRoad
,IntegerCostFunctionScaler
,LargestCommonSubgraph
,MinimizeMakespan
,MinimizeMaximumFlowtime
,MinimizeMaximumLateness
,MinimizeMaximumTardiness
,Mix
,OneMax
,OneMaxAckley
,PermutationInAHaystack
,PermutationToBitVectorProblem.DoubleCost
,PermutationToBitVectorProblem.IntegerCost
,Plateaus
,PolynomialRootFinding
,Porcupine
,QuadraticAssignmentProblem
,RandomTSPMatrix
,RandomTSPMatrix.Double
,RandomTSPMatrix.Integer
,RoyalRoad
,Trap
,TSP
,TSP.Double
,TSP.DoubleMatrix
,TSP.Integer
,TSP.IntegerMatrix
,TwoMax
,TwoMaxEqualPeaks
,WeightedEarlinessTardiness
,WeightedFlowtime
,WeightedLateness
,WeightedNumberTardyJobs
,WeightedSquaredTardiness
,WeightedTardiness
public interface Problem<T extends Copyable<T>>
Base interface for all interfaces defining types of problems supported by the library.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description double
costAsDouble(T candidate)
Computes the cost of a candidate solution to the problem instance.SolutionCostPair<T>
getSolutionCostPair(T candidate)
Computes the cost of a candidate solution to the problem instance.
-
-
-
Method Detail
-
getSolutionCostPair
SolutionCostPair<T> getSolutionCostPair(T candidate)
Computes the cost of a candidate solution to the problem instance. The lower the cost, the more optimal the candidate solution.- Parameters:
candidate
- The candidate solution to evaluate.- Returns:
- A SolutionCostPair object containing the candidate solution and the cost of that candidate solution. Lower cost means better solution.
-
costAsDouble
double costAsDouble(T candidate)
Computes the cost of a candidate solution to the problem instance. The lower the cost, the more optimal the candidate solution. Note that subinterfaces provide methods for computing the cost as more specific types (e.g., as an int).- Parameters:
candidate
- The candidate solution to evaluate.- Returns:
- The cost of the candidate solution as a value of type double. Lower cost means better solution.
-
-