I want to find the best solution for a problem. However, the solution(chromosome) is represented as a vector of integers (length unknown).
As far as I know, NLOPT accepts double*
as an input. Furthermore, the number of attributes is a constant
. So is it possible to wrap around and pass a std::vector<int>
?
EDIT - Tiny desciption of the problem:
I have a set of points. I want to sort this point using a heuristic. This heuristic is some what complex. It is the less possible number of crossing lines between them if we draw line between each consecutive points. I was thinking of something close to the gentic algorithm where I can represent the solution as chromosome of the ordered indexes.
I pick NLOPT because I have very successful previous experiment with it. I know it could be solved using many other genetic or bees algorithms libraries. But here I am asking about NLOPT it self.