Ga () is extremely slow when called from a function (?)

So I am trying to use ga () for some optimization. I fixed the problem with optimtool and exported the settings. They are then passed to the function. Inside this function, I then call ga ().

Using identical data and identical settings, when I call ga () from inside a function, it is 10-20 times slower than when I call it either from inside optimtool or just using the command line in the workspace.

I'm not sure if this is the genetic algorithm itself is slower, or if it is a fitness function.

The CPU is 100% stuck and there is a lot of free memory in both cases.

Any ideas?

+3


source to share





All Articles