Closed Ellyuca closed 3 years ago
Hi! Sorry for my late reply. Sure it is possible, see the code below.
import numpy as np
from pymoo.algorithms.nsga3 import ReferenceDirectionSurvival
from pymoo.factory import get_reference_directions, Problem
from pymoo.model.population import Population
F = np.random.random((182, 3))
pop = Population.new(F=F)
ref_dirs = get_reference_directions("das-dennis", 3, n_partitions=12)
survival = ReferenceDirectionSurvival(ref_dirs)
survivors = survival.do(Problem(n_var=-1, n_obj=3, n_constr=0), pop, 91)
Hi julesy89. Thank you very much for your reply. I will test it as soon as possible and see what happens.
Stay safe and healthy, Best Elly.
Edit: everything seems to be working just as I needed. Thank you once again!
Great! Glad I could help.
Hi! First of all I want to apologize for my ignorance regarding this library. I just found out about it and I have little knowledge about how to use it.
I have the following situation:
[ [f1_1, f1_2, f1_3] , [f2_1, f2_2, f2_3] , [f3_1, f3_2, f3_3], [f4_1, f4_2, f4_3], [f5_1, f5_2, f5_3]]
, wherefi_j
indicates the objective'sj
fitness value of individuali
.I wanted to ask if it's possible to apply only the survival selection (non-dominated sorting + Reference points based selection as presented in the paper ) from NSGA3 to select the best
k
individuals from a list ofN
individuals based on their pre-computed fitness values.I am greatly thankful for any help, tips and advice. Thank you everyone for your time.