public void validate() throws InvalidProgramException {
if (this.input == null) {
throw new RuntimeException("Operator for initial partial solution is not set.");
}
if (this.iterationResult == null) {
throw new InvalidProgramException("Operator producing the next version of the partial " +
"solution (iteration result) is not set.");
}
if (this.terminationCriterion == null && this.numberOfIterations <= 0) {
throw new InvalidProgramException("No termination condition is set " +
"(neither fix number of iteration nor termination criterion).");
}
}