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

Save solutions, function, and time of each run in experiment and view progress bar in experiment #122

Closed mishras9 closed 2 years ago

mishras9 commented 2 years ago

Below is the code for reading experiment as is given in jmetlpy document. In 'data' for each algorithm in experiment there is just three files which I assume gets updated after each run. However, I want to store the solutions, function value, and time for each run. Also, how can I see the progress using a progress bar while running the experiment? @ajnebro @TimJay @Juanjdurillo @Canicio @cbarba

if __name__ == '__main__':
    # Configure the experiments
    jobs = configure_experiment(problems={'ZDT1': ZDT1(), 'ZDT2': ZDT2(), 'ZDT3': ZDT3()}, n_run=100)

    # Run the study
    output_directory = 'data'
    experiment = Experiment(output_dir=output_directory, jobs=jobs)
    progress_bar = ProgressBarObserver(max=max_evaluations)
    experiment.observable.register(progress_bar)
    experiment.run()
mishras9 commented 2 years ago

@ajnebro any replies to this issue?

ajnebro commented 2 years ago

The ProgressBarObserver is intended to show the progress of an algorithm, not the progress of a experiment.

mishras9 commented 2 years ago

Okay. But how can I store the solutions, function value, and time for each run in an experiment.

ajnebro commented 2 years ago

If you are using the examples/experiment/comparison.py program, it produces the data you comment:

imagen
mishras9 commented 2 years ago

Thank you. For each algorithm in an experiment, how can we compute the average time required for each run and total time required for all runs?