Why does ga change the 'Vectorized'-option to 'on' by itself?
Mostrar comentarios más antiguos
My ga optimizer problem always produces an error after some generations. The error is caused by calling my fitness function vectorized, even though I set the 'Vectorized'-option to 'off' before.
When I set a breakpoint directly before in 'galincon', I can see that the 'Vectorized'-option is set to 'on'. 'galincon' is called from 'gaminlpengine' (no code), which is called from 'gaminlp' (no code), which is called from 'ga'. If I set a breakpoint in 'ga', the 'Vectorized'-option is still set to 'off'.
It's no big problem, I could easily change my fitness function code to work vectorized. But it should not happen that way, should it? Why is that option changed automatically?
1 comentario
Stephen23
el 14 de Sept. de 2016
As an additional problem: I'd know a very good way to improve crossover, but I must not change it to 'custom' with integer problems. Why? Is there a workaround?
Respuesta aceptada
Más respuestas (1)
Alan Weiss
el 13 de Sept. de 2016
0 votos
This sounds to me like a bug. Thanks for the thorough report. Can you please tell us what version of MATLAB you are using? And can you give reproduction steps? It sounds as if you are solving a mixed-integer problem. I have never seen this bug, and I have solved a good number of such problems, so this might be hard for us to find without reproduction steps.
Alan Weiss
MATLAB mathematical toolbox documentation
Categorías
Más información sobre Choose a Solver en Centro de ayuda y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!