designing fitness function in genetic algorithm

后端 未结 2 573
再見小時候
再見小時候 2021-01-20 17:30

I need to solve simultaneous linear equations (5 equations with 7 unknowns i.e an under-determined problem) where the variables vary over a wide range of [0 - 1,00,000]. Ca

2条回答
  •  天涯浪人
    2021-01-20 17:42

    Assuming that your system is written in a form like this: e_1(x1, x2, ..., x7) = 0 e_2(x1, x2, ..., x7) = 0 ... e_5(x1, x2, ..., x7) = 0

    then a fitness function F(x1, x2, ..., x7) = abs(e_1(x1, ..., x7)) + abs(e_2(x1, ..., x7) + ... + abs(e_5(x1, ..., x7) may do the trick. You can probably change the + with something else (such as multiplication or the maximum operator, as proposed in the article mentioned by @JohnIdol )

    This will probably work in non-linear systems also.

提交回复
热议问题