Class TSPTWSolutionValidator

java.lang.Object
es.urjc.etsii.grafo.solution.SolutionValidator<TSPTWSolution, TSPTWInstance>
es.urjc.etsii.grafo.tsptw.model.TSPTWSolutionValidator

public class TSPTWSolutionValidator extends SolutionValidator<TSPTWSolution, TSPTWInstance>
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 Details

    • TSPTWSolutionValidator

      public TSPTWSolutionValidator()
  • Method Details

    • validate

      public ValidationResult validate(TSPTWSolution solution)
      Validate the current solution, check that no constraint is broken and everything is fine
      Specified by:
      validate in class SolutionValidator<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.