From 499e82cc8f8a23820af1e62053ca0b71d69525db Mon Sep 17 00:00:00 2001 From: Craig Warren Date: Tue, 1 Mar 2016 14:47:16 +0000 Subject: [PATCH] Corrected extra lists and saving of optimisation parameters. --- gprMax/optimisation_taguchi.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gprMax/optimisation_taguchi.py b/gprMax/optimisation_taguchi.py index 62c3ff24..dadc72b6 100644 --- a/gprMax/optimisation_taguchi.py +++ b/gprMax/optimisation_taguchi.py @@ -109,7 +109,7 @@ def run_opt_sim(args, numbermodelruns, inputfile, usernamespace): # Update dictionary with history of parameters with optimal values for key, value in optparams.items(): - optparamshist[key].append(value) + optparamshist[key].append(value[0]) # Run a confirmation experiment with optimal values numbermodelruns = 1 @@ -141,7 +141,7 @@ def run_opt_sim(args, numbermodelruns, inputfile, usernamespace): # Save optimisation parameters history and fitness values history to file opthistfile = inputfileparts[0] + '_hist' - np.savez(opthistfile, dict(optparamshist), fitnessvalueshist=fitnessvalueshist, optparamsinit=optparamsinit) + np.savez(opthistfile, optparamshist=dict(optparamshist), fitnessvalueshist=fitnessvalueshist, optparamsinit=optparamsinit) print('\n{}\nTaguchi optimisation completed after {} iteration(s).\nHistory of optimal parameter values {} and of fitness values {}\n{}\n'.format(68*'*', iteration, dict(optparamshist), fitnessvalueshist, 68*'*'))