Parameter output problem of genetic algorithm

1 visualización (últimos 30 días)
仟仟
仟仟 el 7 de Nov. de 2023
Comentada: Walter Roberson el 29 de Nov. de 2023
When I apply genetic algorithm to find the optimal parameter, before the parameter enters the algorithm, I have controlled the parameter to keep two decimals in their respective ranges, but when the final output, the optimal parameter returned is really six decimals. Why? What am I supposed to do? (Note: I need to keep two decimal places in the parameter before entering the algorithm, because a change of 0.001 in the parameter has a great effect on the result, so I can't round the result directly.)Look forward to your reply~
  7 comentarios
仟仟
仟仟 el 9 de Nov. de 2023
But this also modifies the number before entering the algorithm. Because for example, the parameter a=1.123456, the error at this time may be 0.00001. But if you round a=0.12, the error may become particularly large. So I need to keep this number two decimal places before I do the algorithm.
Walter Roberson
Walter Roberson el 29 de Nov. de 2023
You will need to write your own genetic optimizer that executes the way you want the code to execute.
I personally do not think that what you want to do is consistent, but I will leave that up to you.
You might want to look in the File Exchange as there are some genetic algorithm implementations there that you might want to start with and then make your modifications.

Iniciar sesión para comentar.

Respuestas (0)

Categorías

Más información sobre Genetic Algorithm en Help Center y File Exchange.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by