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

Values and variables are not saved to files #59

Closed 1017073490 closed 1 year ago

1017073490 commented 4 years ago

Thank you for adding some new examples, and I can run the moead_iepsilon_srinivas successfully. I'm going to write my own target function based on this demo. But another moead_iepsilon_lircmop2 still have one problem that there are no results in the files of FUN and VAR. With best wishes!

benhid commented 4 years ago

Try moving the print functions just after the results:

front = algorithm.get_result()

print_function_values_to_file(front, 'FUN.' + algorithm.label)
print_variables_to_file(front, 'VAR.' + algorithm.label)

The interactive plot might be blocking the main thread, so instead of stopping the script's execution just close the figure.