How are the design variables in the SimpleGA or DifferentialEvolution drivers initialized?

Viewed 47

I am having trouble navigating the source code to see how the design variables in the initial population for the SimpleGA and DifferentialEvolution Drivers are set. Is there some sort of Latin Hypercube sampling of the design variable ranges? Do the initial values I set in my problem instance get used like they would for the other drivers (Scipy and pyOptSparse)?

Many thanks, Garrett

1 Answers

For these two drivers, the initial value in the model is not used. Its not even clear to me what it would mean to use that value directly, since you need a stochastically generated population --- but I'm admittedly not an expert on the latest GA population initialization methods. However, I can answer the question of how they do get initialized as of OpenMDAO V3.17:

Simple GA Driver:

This driver does seem to use an LHS sampling like this:

new_gen = np.round(lhs(self.lchrom, self.npop, criterion='center',
                           random_state=random_state))
new_gen[0] = self.encode(x0, vlb, vub, bits)

Differential Evolution Driver: This driver uses a uniform random distribution like this:

population = rng.random([self.npop, self.lchrom]) * (vub - vlb) + vlb  # scale to bounds

Admittedly, it doesn't make a whole lot of sense why the intialization methods are different, and perhaps there should be some option to pick from a set of methods or provide your own initial population somehow. A POEM and/or pull-request to improve this would be most welcome.

Related