Is it possible to use moead with 3 objectives in version 1.6.0?
Closed this issue · 6 comments
This is my implementation of MOEAD that I wrote following the documentation:
algorithm = MOEAD(
problem=problem,
population_size=100,
crossover=DifferentialEvolutionCrossover(CR=1.0, F=0.5, K=0.5),
mutation=PolynomialMutation(probability=1.0 / problem.number_of_variables(), distribution_index=20),
aggregative_function=Tschebycheff(dimension=problem.number_of_objectives()),
neighbor_size=12,
neighbourhood_selection_probability=0.7,
max_number_of_replaced_solutions=2,
weight_files_path='resources/MOEAD_weights',
termination_criterion=StoppingByEvaluations(max_evaluations=10000)
)
When I try to run MOEAD using a 3-objective problem I get the following error:
FileNotFoundError: Failed to initialize weights: resources/MOEAD_weights/W3D_100.dat not found
But, looking in the library installed on my computer via pip, there is no 'resources' folder.
Is there a solution for this problem?
Thank you in advance for your responses
Hi.
You can find the resources folder in the project repository (https://github.com/jMetal/jMetalPy).
Regards,
Antonio
Hi. You can find the resources folder in the project repository (https://github.com/jMetal/jMetalPy).
Regards,
Antonio
Hi, thank you for your answer.
Where should I put the resources folder? Because I tried putting it in the root of the jmetalpy library at the same level as the algorithm, core, lab and so on folders but it doesn't work.
I also tried putting it one level above (so in the python3.11 site-packages folder) but it is not found there either when running MOEAD
Hi.
You can find the resources folder in the project repository (https://github.com/jMetal/jMetalPy).
Regards,
Antonio
I followed your advice and was able to solve the problem. I mistakenly thought i should put the resources folder inside the library folder but instead i should put it in the root of my project.
Thank you very much for your help :D
Just one more question. I saw that there are various files in the resources folder but there is no one related to a weight of 24. Do you know how I can calculate it?
I saw that in the class neighborhood.py inside the utils folder of jmetalpy there is this note:
"""Precomputed weights from
* Zhang, Multiobjective Optimization Problems With Complicated Pareto Sets, MOEA/D and NSGA-II
Downloaded from.
* http://dces.essex.ac.uk/staff/qzhang/MOEAcompetition/CEC09final/code/ZhangMOEADcode/moead030510.rar
"""
The problem is that the link doesn't work and I was hoping there would be a reference on how to calculate the weights
MOEA/D relies heavily on weight vectors to produce high quality diversity fronts. These vectors depends of the number of objectives and the population size. Just compare the results of optimizing the DTLZ1 problem with a population of 91 and a population of 100. One method to produce such weight vectors is the Das Dennis algorithm (https://github.com/jMetal/DasDennis).
You can take a look to the resources folder of the jMetal project (https://github.com/jMetal/jMetal/tree/main/resources/weightVectorFiles/moead) to find files containing weight vectors.