Package es.urjc.etsii.grafo.testutil
Class TestSolution
java.lang.Object
es.urjc.etsii.grafo.solution.Solution<TestSolution,TestInstance>
es.urjc.etsii.grafo.testutil.TestSolution
-
Field Summary
FieldsFields inherited from class es.urjc.etsii.grafo.solution.Solution
lastModifiedTime, lastMoves -
Constructor Summary
ConstructorsConstructorDescriptionTestSolution(TestInstance ins) TestSolution(TestInstance ins, double score) TestSolution(TestInstance ins, double[] score) TestSolution(TestInstance ins, double[] score, Map<String, Function<TestSolution, Object>> properties) TestSolution(TestInstance ins, double score, Map<String, Function<TestSolution, Object>> properties) TestSolution(TestSolution sol) -
Method Summary
Modifier and TypeMethodDescriptionClone the current solution.Define custom properties for the solutionbooleanstatic TestSolution[]from(double... scores) static TestSolution[]from(TestInstance instance, double... scores) doublegetScore()doublegetScore(int i) inthashCode()voidresetTTB()voidsetScore(double score) voidsetScore(int i, double score) voidsetTTB(long ttb) toString()Resume this solution Generate a toString method using your IDEMethods inherited from class es.urjc.etsii.grafo.solution.Solution
getInstance, getLastModifiedTime, getVersion, lastExecutesMoves, lastExecutesMovesAsString, notifyUpdate, notifyUpdate
-
Field Details
-
score
protected double[] score
-
-
Constructor Details
-
TestSolution
-
TestSolution
-
TestSolution
-
TestSolution
public TestSolution(TestInstance ins, double score, Map<String, Function<TestSolution, Object>> properties) -
TestSolution
public TestSolution(TestInstance ins, double[] score, Map<String, Function<TestSolution, Object>> properties) -
TestSolution
-
-
Method Details
-
from
-
from
-
cloneSolution
Description copied from class:SolutionClone the current solution. Deep clone mutable data or you will regret it.- Specified by:
cloneSolutionin classSolution<TestSolution,TestInstance> - Returns:
- A deep clone of the current solution
-
getScore
public double getScore() -
getScore
public double getScore(int i) -
setScore
public void setScore(double score) -
setScore
public void setScore(int i, double score) -
toString
Description copied from class:SolutionResume this solution Generate a toString method using your IDE- Specified by:
toStringin classSolution<TestSolution,TestInstance> - Returns:
- string representation of the current solution
-
setTTB
public void setTTB(long ttb) -
resetTTB
public void resetTTB() -
customProperties
Description copied from class:SolutionDefine custom properties for the solution- Overrides:
customPropertiesin classSolution<TestSolution,TestInstance> - Returns:
- Map of properties, where the key is the property name and the value is how to calculate the property value
-
equals
-
hashCode
public int hashCode()
-