1

I try to solve this problem using genetic algorithm and get difficult to choose the fitness function. My problem is a little differnt than the original Traveling Salesman Problem ,since the population and maybe also the win unit not neccesrly contain all the cities.

So , I have 2 value for each unit: the amount of cities he visit, the total time and the order he visit the cities. I tried 2-3 fitness function but they don't give good sulotion.

I need idea of good fitness function which take in account the amount of cities he visited and also the total time.

Thanks!

user2459338
  • 21
  • 1
  • 3

2 Answers2

2

In addition to Peladao's suggestions of using a pareto approach or some kind of weighted sum there are two more possibilities that I'd like to mention for the sake of completeness.

First, you could prioritize your fitness functions. So that the individuals in the population are ranked by first goal, then second goal, then third goal. Therefore only if two individuals are equal in the first goal they will be compared by second goal. If there is a clear dominance in your goals this may be a feasible approach.

Second, you could define two of your goals as constraints that you penalize only when they exceed a certain threshold. This may be feasible when e.g. the amount of cities should not be in a certain range, e.g. [4;7], but doesn't matter if it's 4 or 5. This is similar to a weighted sum approach where the contribution of the individual goals to the combined fitness value differs by several orders of magnitude.

The pareto approach is the only one that treats all objectives with equal importance. It requires special algorithms suited for multiobjective optimization though, such as NSGA-II, SPEA2, AbYSS, PAES, MO-TS, ...

In any case, it would be good if you could show the 2-3 fitness functions that you tried. Maybe there were rather simple errors.

Andreas
  • 6,447
  • 2
  • 34
  • 46
1

Multiple-objective fitness functions can be implemented using a Pareto optimal.

You could also use a weighted sum of different fitness values.

For a good and readable introduction into multiple-objective optimisation and GA: http://www.calresco.org/lucas/pmo.htm

Peladao
  • 4,036
  • 1
  • 23
  • 43