[x] multi-thread initial espe runs (ElementSimulation.calculate_espe() uses multiple recoils for some reason, including self.optimization_recoils[0]. Check if a single recoil can be safely used instead.)
[x] remember which combination of NSGA-II/Linear and recoil/fluence is selected (not as simple as saving the other settings because the settings are saved using PropertySavingWidget, which doesn't work well on individual variables). As a quick fix, linear optimization could be the new default selection.
Future TODO:
[ ] add an option to get the starting solution from user
[ ] unit tests (the original NSGA-II was not made with testing in mind so this won't be easy)
[ ] add support for fluence optimization (currently only recoil optimization is supported)
[ ] customizable shape (number of peaks, rectangular or not, peak at surface or deeper)
The less significant recoil in ElementSimulation.calculate_espe() is either self.optimization_recoils[0] or self.get_main_recoil(). That one is only used to get the .erd data file name. The passed recoil_element argument is used for the .recoil name and contents (recoil point locations). I just added a dummy ElementSimulation.optimization_recoils list object to get around this multi-recoil issue in initial sampling. This could be done more elegantly, but it should work.
I changed the default optimization to Linear & recoil.
Issue: #193
Done (from task list):
ElementSimulation.calculate_espe()
uses multiple recoils for some reason, includingself.optimization_recoils[0]
. Check if a single recoil can be safely used instead.)PropertySavingWidget
, which doesn't work well on individual variables). As a quick fix, linear optimization could be the new default selection.Future TODO:
The less significant recoil in
ElementSimulation.calculate_espe()
is eitherself.optimization_recoils[0]
orself.get_main_recoil()
. That one is only used to get the .erd data file name. The passedrecoil_element
argument is used for the .recoil name and contents (recoil point locations). I just added a dummyElementSimulation.optimization_recoils
list object to get around this multi-recoil issue in initial sampling. This could be done more elegantly, but it should work.I changed the default optimization to Linear & recoil.