jMetal / jMetalPy

A framework for single/multi-objective optimization with metaheuristics
https://jmetal.github.io/jMetalPy/index.html
MIT License
498 stars 150 forks source link

Suggestion of 2 new observers #55

Closed saviosampaio closed 1 year ago

saviosampaio commented 4 years ago

Good Morning!

I would like to suggest two other observers:

"WriteSolutionsToFileObserver"

To record solutions, allowing you to examine solutions evolution over generations.

This "observer" can have the same parameters as "WriteFrontToFileObserver" (output_directory, step, silent).

Another interesting observer can also be used for both tasks: "WriteFrontAndSolutionsToFileObserver", with the same parameters.

Thank you very much.

Greetings.

Savio

benhid commented 4 years ago

Thank you for your suggestions! As for the "WriteFrontAndSolutionsToFileObserver", you can attach more than one observer to an algorithm:

algorithm = ...
algorithm.observable.register(WriteFrontToFileObserver())
algorithm.observable.register(WriteSolutionsToFileObserver())
AG500 commented 3 years ago

Hello guys,

In the same spirit, I am looking for a way to record the temperature evolution while using "SimulatedAnnealing" and fitness value at each iteration of algorithms. "BasicObserver" display the fitness but i can't find a way to keep record of it. This could be useful for parameter selection.

If it does not exist i suggest an observer allowing to select what parameters and function values we want to keep record of. I am new to JMetalPy so excuse me if this kind of feature already exist.

Have a nice day!