Closed OlegKarandin closed 1 year ago
Hi. The single objective algorithms in jMetalPy by default do not consider problems with constraints. A way to cope with this issue is to modify them by using the OverallConstraintViolationComparator class when comparing solutions.
Hello, I tried to use jMetalPy for a simple problem with 1 objective and 1 constraint.
I've compared solutions by
GeneticAlgorithm
andSimulatedAnnealing
.GeneticAlgorithm
returns a solution that satisfies the constraint, whileSimulatedAnnealing
returns a solution with better objective, but negative value ofresult.constraints[0]
.Does this mean that algorithm hasn't found a single feasible solution? Or it preferred lower objective, even though constraint is violated?