-
Notifications
You must be signed in to change notification settings - Fork 392
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Provide "warm start" population #44
Comments
Yes, you can pre-define the initial population (this is how it would be called in evolutionary computation). If you just know the design values:
If you like to provide pre-evaluated solutions:
Hope this answers your question. |
Yes! Thanks for your quick respond. And thanks for this awesome library. |
Sorry to reopen this issue, I am having some issues trying to set an initial x value. I am curious what would the "500" (population) be in the MOEA/D algo. I am using elementwise evaluation and I got the following error. I was able to run NSGA3 by setting it to the same as the population size. Thanks for your help.
|
The
Does this work for you? Elementwise evaluation shall not make any difference. |
Thanks for your help! I switched to using I can try to reference a default problem and see if I implemented my own problem correctly, but it seems to be working fine if I remove the My own problem has:
Here's what I am doing: # Reference direction
ref_dirs = get_reference_directions("das-dennis", 2, n_partitions=12)
# Generate initial condition
x = np.full((len(ref_dirs), problem.n_var), 20)
pop = Population(len(x))
pop.set("X", x)
Evaluator().eval(problem, pop)
algorithm = MOEAD(
ref_dirs,
decomposition="pbi",
prob_neighbor_mating=0.95,
sampling=pop
)
termination = get_termination("n_gen", 20)
res = minimize(problem,
algorithm,
termination,
save_history=True,
verbose=True)
|
I just debugged it. And your initial population is NOT supposed to have duplicates. Because a duplicate elimination happens the population becomes a single individual which fails. If you pass instead of X equals to 20 random values it should work.
|
hmm, ok, that's good to know. Thanks a lot for your help, I've added some randomness to |
I am curious if there's a way to provide initial input values to the algorithm so that the search would be quicker?
I am not quite familiar with those genetic algorithms, correct me if I am wrong in this.
The text was updated successfully, but these errors were encountered: