Class TSPTWSolutionValidator
java.lang.Object
es.urjc.etsii.grafo.solution.SolutionValidator<TSPTWSolution, TSPTWInstance>
es.urjc.etsii.grafo.tsptw.model.TSPTWSolutionValidator
Validate that a solution is valid for the TSPTW problem.
Validation is always run after the algorithms executes, and can be run in certain algorithm stages to verify
that the current solution is valid.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvalidate(TSPTWSolution solution) Validate the current solution, check that no constraint is broken and everything is fine
-
Constructor Details
-
TSPTWSolutionValidator
public TSPTWSolutionValidator()
-
-
Method Details
-
validate
Validate the current solution, check that no constraint is broken and everything is fine- Specified by:
validatein classSolutionValidator<TSPTWSolution, TSPTWInstance>- Parameters:
solution- Solution to validate- Returns:
- ValidationResult.ok() if the solution is valid, ValidationResult.fail("reason why it failed") if a solution is not valid.
-