jMetal / jMetalPy

A framework for single/multi-objective optimization with metaheuristics
https://jmetal.github.io/jMetalPy/index.html
MIT License
498 stars 150 forks source link

Permutation problem operators #68

Closed YevheniiSemendiak closed 4 years ago

YevheniiSemendiak commented 4 years ago

Hello everyone!

I have found out that Operators for permutation Problems (TSP) impose assumption about different 'depth' of Configuration variables.

More concretely, CXCrossover and ScrambleMutation operate on configuration variables as it is a nested list (e.g. configuration.variables == [[1,2,3], [1,2,3], ... [1,2,3]]).

In other hand, PermutationSwapMutation, PMXCrossover work with configuration.variables as with 'flat lists' (or, just on top level of nested lists).

As the result, it is impossible to use CXCrossover and ScrambleMutation with TSP problem: image

Is it a bug in implementation, or the intent of these Operators is different?

P.S. Thank you for your framework, I do really like the architecture and code style :+1:

YevheniiSemendiak commented 4 years ago

I have modified those operators in order to use them while solving the TSP problem. If you consider such a fix as possible, I would be glad to submit a PR (after fixing related tests).

ajnebro commented 4 years ago

Hi. I would be great.

Thanks,

Antonio

YevheniiSemendiak commented 4 years ago

Hey @ajnebro,

I have updated the tests, but can not find the develop branch in repository (seems like it was deleted after the latest release in #79) therefore, I cannot submit a PR properly. Could you assist?

Thanks!

benhid commented 4 years ago

My bad, @YevheniiSemendiak I have just restored the develop branch.

Thank you.