Multi-objective BO: Perovskite hysteresis JV fits with SIMsalabim (fake data)

This notebook is a demonstration of how to fit scan-speed dependent JV curves with drift-diffusion models using the SIMsalabim package.

[1]:
# Import necessary libraries
import warnings, os, sys, shutil
# remove warnings from the output
os.environ["PYTHONWARNINGS"] = "ignore"
warnings.filterwarnings(action='ignore', category=FutureWarning)
warnings.filterwarnings(action='ignore', category=UserWarning)
import pandas as pd
import matplotlib.pyplot as plt
import numpy as np
from numpy.random import default_rng
import torch, copy, uuid
import pySIMsalabim as sim
from pySIMsalabim.experiments.hysteresis import *
import ax, logging
from ax.utils.notebook.plotting import init_notebook_plotting, render
init_notebook_plotting() # for Jupyter notebooks
import joblib  # Import joblib for parallel processing

try:
    from optimpv import *
    from optimpv.axBOtorch.axUtils import *
except Exception as e:
    sys.path.append('../') # add the path to the optimpv module
    from optimpv import *
    from optimpv.axBOtorch.axUtils import *
[INFO 12-05 18:09:39] ax.utils.notebook.plotting: Injecting Plotly library into cell. Do not overwrite or delete cell.
[INFO 12-05 18:09:39] ax.utils.notebook.plotting: Please see
    (https://ax.dev/tutorials/visualizations.html#Fix-for-plots-that-are-not-rendering)
    if visualizations are not rendering.

Define the parameters for the simulation

[2]:
params = [] # list of parameters to be optimized

mun = FitParam(name = 'l2.mu_n', value = 6e-4, bounds = [1e-5,1e-3], values = None, start_value = None, log_scale = True, value_type = 'float', fscale = None, rescale = False, stepsize = None, display_name=r'$\mu_n$', unit='m$^2$ V$^{-1}$s$^{-1}$', axis_type = 'log', std = 0,encoding = None,force_log = True)
params.append(mun)

mup = FitParam(name = 'l2.mu_p', value = 4e-4, bounds = [1e-5,1e-3], values = None, start_value = None, log_scale = True, value_type = 'float', fscale = None, rescale = False, stepsize = None, display_name=r'$\mu_p$', unit=r'm$^2$ V$^{-1}$s$^{-1}$', axis_type = 'log', std = 0,encoding = None,force_log = True)
params.append(mup)

bulk_tr = FitParam(name = 'l2.N_t_bulk', value = 1e20, bounds = [1e19,1e21], values = None, start_value = None, log_scale = True, value_type = 'float', fscale = None, rescale = False, stepsize = None, display_name=r'$N_{T}$', unit=r'm$^{-3}$', axis_type = 'log', std = 0,encoding = None,force_log = False)
params.append(bulk_tr)

HTL_int_trap = FitParam(name = 'l1.N_t_int', value = 5e11, bounds = [1e11,1e13], values = None, start_value = None, log_scale = True, value_type = 'float', fscale = None, rescale = False, stepsize = None, display_name=r'$N_{T,int}^{HTL}$', unit='m$^{-2}$', axis_type = 'log', std = 0,encoding = None,force_log = False)
params.append(HTL_int_trap)

ETL_int_trap = FitParam(name = 'l2.N_t_int', value = 4e12, bounds = [1e11,1e13], values = None, start_value = None, log_scale = True, value_type = 'float', fscale = None, rescale = False, stepsize = None, display_name=r'$N_{T,int}^{ETL}$', unit='m$^{-2}$', axis_type = 'log', std = 0,encoding = None,force_log = False)
params.append(ETL_int_trap)

Nions = FitParam(name = 'l2.N_ions', value = 1e22, bounds = [1e20,1e22], type='range', values = None, start_value = None, log_scale = True, value_type = 'float', fscale = None, rescale = False, stepsize = None, display_name=r'$C_{ions}$', unit='m$^{-3}$', axis_type = 'log', std = 0,encoding = None,force_log = False)
params.append(Nions)

muions = FitParam(name = 'l2.mu_ions', value = 5.7e-12, bounds = [1e-13,1e-11], type='range', values = None, start_value = None, log_scale = True, value_type = 'float', fscale = None, rescale = True, stepsize = None, display_name=r'$\mu_{ions}$', unit='m$^2$ V$^{-1}$s$^{-1}$', axis_type = 'log', std = 0,encoding = None,force_log = True)
params.append(muions)

R_series = FitParam(name = 'R_series', value = 0e-4, bounds = [0e-5,1e-3], type='fixed', values = None, start_value = None, log_scale = True, value_type = 'float', fscale = None, rescale = False, stepsize = None, display_name=r'$R_{series}$', unit=r'$\Omega$ m$^2$', axis_type = 'log', std = 0,encoding = None,force_log = False)
params.append(R_series) # here we switch of the Rseries and set it to 0 as it having a series resistance dramatically slows down the simulation. We can switch it on later if needed.

num_free_params = 0
for p in params:
    if p.type != 'fixed'    :
        num_free_params += 1
# save the original parameters for later
params_orig = copy.deepcopy(params)

Generate some fake data

Here we generate some fake data to fit. The data is generated using the same model as the one used for the fitting, so it is a good test of the fitting procedure. For more information on how to run SIMsalabim from python see the pySIMsalabim package.

[3]:
# First we do the JV simulation with the original parameters
# Set the session path for the simulation and the input files
session_path_zimt = os.path.join(os.path.join(os.path.abspath('../'),'SIMsalabim','ZimT'))
input_path_zimt = os.path.join(os.path.join(os.path.join(os.path.abspath('../'),'Data','simsalabim_test_inputs','fakePerovskite')))
simulation_setup_filename_zimt = 'simulation_setup_zimt_fakePerovskite.txt'
simulation_setup_zimt = os.path.join(session_path_zimt, simulation_setup_filename_zimt)
optical_files = ['nk_glass.txt','nk_ITO.txt','nk_PTAA.txt','nk_FACsPbIBr.txt','nk_C60_1.txt','nk_Au.txt']
# path to the layer files defined in the simulation_setup file
l1 = 'PTAA.txt'
l2 = 'fakePerovskite.txt'
l3 = 'C60.txt'
l1 = os.path.join(input_path_zimt, l1)
l2 = os.path.join(input_path_zimt, l2)
l3 = os.path.join(input_path_zimt, l3)

# copy this files to session_path
force_copy = True
if not os.path.exists(session_path_zimt):
    os.makedirs(session_path_zimt)
for file in [l1,l2,l3,simulation_setup_filename_zimt]:
    file = os.path.join(input_path_zimt, os.path.basename(file))
    if force_copy or not os.path.exists(os.path.join(session_path_zimt, os.path.basename(file))):
        shutil.copyfile(file, os.path.join(session_path_zimt, os.path.basename(file)))
    else:
        print('File already exists: ',file)
# copy the optical files to the session path
for file in optical_files:
    file = os.path.join(input_path_zimt, os.path.basename(file))
    if force_copy or not os.path.exists(os.path.join(session_path_zimt, os.path.basename(file))):
        shutil.copyfile(file, os.path.join(session_path_zimt, os.path.basename(file)))

# Show the device structure
fig = sim.plot_band_diagram(simulation_setup_zimt, session_path_zimt)

# Set the JV parameters
direction = -1
G_frac = 1
Vmin = 0
Vmax = 1.2
steps = 100

cmd_pars = [] # see pySIMsalabim documentation for the command line parameters
# Add the parameters to the command line arguments
for param in params:
    if param.name == 'l2.N_ions':
        cmd_pars.append({'par':'l2.N_cation', 'val':str(param.value)})
        cmd_pars.append({'par':'l2.N_anion', 'val':str(param.value)})
    elif param.name == 'l2.mu_ions':
        cmd_pars.append({'par':'l2.mu_cation', 'val':str(param.value)})
        cmd_pars.append({'par':'l2.mu_anion', 'val':str(param.value)})
    else:
        cmd_pars.append({'par':param.name, 'val':str(param.value)})

# cmd_pars.append({'par':'tolVint', 'val':str(1e-5)}) # add the series resistance
# Define a function to run a single hysteresis simulation
def run_hysteresis_simulation(scan_speed, session_path, simulation_setup, direction, G_frac, Vmin, Vmax, steps, cmd_pars):
    UUID = str(uuid.uuid4())
    ret, mess, rms = Hysteresis_JV(simulation_setup, session_path, 0, scan_speed, direction, G_frac,
                                 Vmin=Vmin, Vmax=Vmax, steps=steps, UUID=UUID, cmd_pars=cmd_pars)

    # Load the data
    data = pd.read_csv(os.path.join(session_path, 'tj_'+UUID+'.dat'), sep=r'\s+')

    # Extract the data
    X = np.asarray(data['Vext'].values)
    y = np.asarray(data['Jext'].values)

    return scan_speed, X, y, UUID

# List of scan speeds to simulate
scan_speeds = [0.1, 1, 10, 100]

# Run simulations in parallel
results = joblib.Parallel(n_jobs=-1)(
    joblib.delayed(run_hysteresis_simulation)(
        scan_speed, session_path_zimt, simulation_setup_zimt, direction,
        G_frac, Vmin, Vmax, steps, cmd_pars
    ) for scan_speed in scan_speeds
)

# Extract results
X_data = {}
y_data = {}
UUIDs = {}

for scan_speed, X, y, UUID in results:
    X_data[scan_speed] = X
    y_data[scan_speed] = y
    UUIDs[scan_speed] = UUID

# Assign to variables for backward compatibility
X1, y1 = X_data[0.1], y_data[0.1]
X2, y2 = X_data[1], y_data[1]
X3, y3 = X_data[10], y_data[10]
X4, y4 = X_data[100], y_data[100]

# Plot the results
plt.figure()

plt.plot(X1, y1, label=f'Scan Speed = 0.1')
plt.plot(X2, y2, label=f'Scan Speed = 1')
plt.plot(X3, y3, label=f'Scan Speed = 10')
plt.plot(X4, y4, label=f'Scan Speed = 100')

plt.xlabel('Applied Voltage [V]')
plt.ylabel('Current Density [A/m$^2$]')
plt.legend()
plt.show()



../_images/examples_MO_hysteresis_fakePerovskite_5_0.png
../_images/examples_MO_hysteresis_fakePerovskite_5_1.png

Run the optimization

[4]:
# Define the Agent and the target metric/loss function
from optimpv.DDfits.HysteresisAgent import HysteresisAgent

metric = 'nrmse' # can be 'nrmse', 'mse', 'mae'
loss = 'linear' # can be 'linear', 'huber', 'soft_l1'
threshold = 0.1 # need this to get a reference point for the hypervolume calculation

hyst1 = HysteresisAgent(params, X1, y1, session_path_zimt, Vmin, Vmax, scan_speeds[0], steps, direction, G_frac=1, simulation_setup=simulation_setup_zimt, metric=[metric], loss=[loss], threshold= [threshold],minimize=[True], name='Hyst1')

hyst2 = HysteresisAgent(params, X2, y2, session_path_zimt, Vmin, Vmax, scan_speeds[1], steps, direction, G_frac=1, simulation_setup=simulation_setup_zimt, metric=[metric], loss=[loss], threshold= [threshold],minimize=[True], name='Hyst2')

hyst3 = HysteresisAgent(params, X3, y3, session_path_zimt, Vmin, Vmax, scan_speeds[2], steps, direction, G_frac=1, simulation_setup=simulation_setup_zimt, metric=[metric], loss=[loss], threshold= [threshold],minimize=[True], name='Hyst3')

hyst4 = HysteresisAgent(params, X4, y4, session_path_zimt, Vmin, Vmax, scan_speeds[3], steps, direction, G_frac=1, simulation_setup=simulation_setup_zimt, metric=[metric], loss=[loss], threshold= [threshold],minimize=[True], name='Hyst4')

[ ]:
from optimpv.axBOtorch.axBOtorchOptimizer import axBOtorchOptimizer
from optimpv.axBOtorch.axUtils import get_VMLC_default_model_kwargs_list

optimizer = axBOtorchOptimizer(params = params, agents = [hyst1, hyst2, hyst3, hyst4], models = ['CENTER','SOBOL','BOTORCH_MODULAR'],n_batches = [1,1,20], batch_size = [1,10,2], max_parallelism = -1, model_kwargs_list = get_VMLC_default_model_kwargs_list(num_free_params,use_CENTER=True,is_MOO=True))
[6]:
optimizer.optimize() # run the optimization with ax
[INFO 12-05 18:09:56] optimpv.axBOtorchOptimizer: Trial 0 with parameters: {'l2.mu_n': -4.0, 'l2.mu_p': -4.0, 'l2.N_t_bulk': 1e+20, 'l1.N_t_int': 1000000000000.0, 'l2.N_t_int': 1000000000000.0, 'l2.N_ions': 1e+21, 'l2.mu_ions': -12.0}
[INFO 12-05 18:10:10] optimpv.axBOtorchOptimizer: Trial 0 completed with results: {'Hyst1_JV_nrmse_linear': np.float64(0.08498926875954489), 'Hyst2_JV_nrmse_linear': np.float64(0.07765588194941991), 'Hyst3_JV_nrmse_linear': np.float64(0.0696485492867804), 'Hyst4_JV_nrmse_linear': np.float64(0.08292429135537334)} and parameters: {'l2.mu_n': -4.0, 'l2.mu_p': -4.0, 'l2.N_t_bulk': 1e+20, 'l1.N_t_int': 1000000000000.0, 'l2.N_t_int': 1000000000000.0, 'l2.N_ions': 1e+21, 'l2.mu_ions': -12.0}
[INFO 12-05 18:10:10] optimpv.axBOtorchOptimizer: Trial 1 with parameters: {'l2.mu_n': -3.093522636219859, 'l2.mu_p': -3.693742550909519, 'l2.N_t_bulk': 3.026135448643009e+19, 'l1.N_t_int': 3725744175501.8315, 'l2.N_t_int': 1013647421110.3577, 'l2.N_ions': 2.0084305113213924e+20, 'l2.mu_ions': -11.98447067849338}
[INFO 12-05 18:10:10] optimpv.axBOtorchOptimizer: Trial 2 with parameters: {'l2.mu_n': -4.22980966232717, 'l2.mu_p': -4.796986980363727, 'l2.N_t_bulk': 2.84919030738934e+20, 'l1.N_t_int': 216666922211.94626, 'l2.N_t_int': 228816124951.3424, 'l2.N_ions': 3.3382911260490313e+21, 'l2.mu_ions': -12.553506979718804}
[INFO 12-05 18:10:10] optimpv.axBOtorchOptimizer: Trial 3 with parameters: {'l2.mu_n': -4.573989424854517, 'l2.mu_p': -3.1039786096662283, 'l2.N_t_bulk': 8.452515599386762e+19, 'l1.N_t_int': 1202761665242.3528, 'l2.N_t_int': 321007046655.92004, 'l2.N_ions': 1.6541837548920871e+21, 'l2.mu_ions': -11.203693496063352}
[INFO 12-05 18:10:10] optimpv.axBOtorchOptimizer: Trial 4 with parameters: {'l2.mu_n': -3.7493467144668102, 'l2.mu_p': -4.402345523238182, 'l2.N_t_bulk': 7.651487963888279e+20, 'l1.N_t_int': 668906262715.4469, 'l2.N_t_int': 7245243409076.8125, 'l2.N_ions': 9.687610763952673e+20, 'l2.mu_ions': -12.271753719076514}
[INFO 12-05 18:10:10] optimpv.axBOtorchOptimizer: Trial 5 with parameters: {'l2.mu_n': -3.887081665918231, 'l2.mu_p': -3.3770684394985437, 'l2.N_t_bulk': 1.7023326046930253e+20, 'l1.N_t_int': 491002063858.0777, 'l2.N_t_int': 4493775296763.064, 'l2.N_ions': 1.030347104506044e+20, 'l2.mu_ions': -11.37129226885736}
[INFO 12-05 18:10:10] optimpv.axBOtorchOptimizer: Trial 6 with parameters: {'l2.mu_n': -4.805452322587371, 'l2.mu_p': -4.113674435764551, 'l2.N_t_bulk': 1.6011916715432122e+19, 'l1.N_t_int': 2920409864504.167, 'l2.N_t_int': 952506536829.0046, 'l2.N_ions': 6.090559726035827e+21, 'l2.mu_ions': -12.182524057105184}
[INFO 12-05 18:10:10] optimpv.axBOtorchOptimizer: Trial 7 with parameters: {'l2.mu_n': -4.398775655776262, 'l2.mu_p': -3.794933658093214, 'l2.N_t_bulk': 4.75875347716792e+20, 'l1.N_t_int': 163031660905.73312, 'l2.N_t_int': 142311407504.31482, 'l2.N_ions': 2.974326344918287e+21, 'l2.mu_ions': -11.59054603613913}
[INFO 12-05 18:10:10] optimpv.axBOtorchOptimizer: Trial 8 with parameters: {'l2.mu_n': -3.2937621138989925, 'l2.mu_p': -4.711403818801045, 'l2.N_t_bulk': 4.294103158887684e+19, 'l1.N_t_int': 8785580881200.284, 'l2.N_t_int': 3016015739184.822, 'l2.N_ions': 4.986428995175788e+20, 'l2.mu_ions': -12.900800792500377}
[INFO 12-05 18:10:10] optimpv.axBOtorchOptimizer: Trial 9 with parameters: {'l2.mu_n': -3.398669334128499, 'l2.mu_p': -3.20325493440032, 'l2.N_t_bulk': 3.858962260304989e+20, 'l1.N_t_int': 2221233231647.6436, 'l2.N_t_int': 290241468756.08527, 'l2.N_ions': 6.721933208759624e+20, 'l2.mu_ions': -11.489306854084134}
[INFO 12-05 18:10:10] optimpv.axBOtorchOptimizer: Trial 10 with parameters: {'l2.mu_n': -4.2936233673244715, 'l2.mu_p': -4.287457095459104, 'l2.N_t_bulk': 3.970956578046116e+19, 'l1.N_t_int': 419684493710.41095, 'l2.N_t_int': 1484776185561.1582, 'l2.N_ions': 1.244911751592563e+21, 'l2.mu_ions': -12.050656428560615}
[INFO 12-05 18:11:28] optimpv.axBOtorchOptimizer: Trial 1 completed with results: {'Hyst1_JV_nrmse_linear': np.float64(0.15689136243597376), 'Hyst2_JV_nrmse_linear': np.float64(0.15467029535237978), 'Hyst3_JV_nrmse_linear': np.float64(0.15226019534810387), 'Hyst4_JV_nrmse_linear': np.float64(0.1562967358036594)} and parameters: {'l2.mu_n': -3.093522636219859, 'l2.mu_p': -3.693742550909519, 'l2.N_t_bulk': 3.026135448643009e+19, 'l1.N_t_int': 3725744175501.8315, 'l2.N_t_int': 1013647421110.3577, 'l2.N_ions': 2.0084305113213924e+20, 'l2.mu_ions': -11.98447067849338}
[INFO 12-05 18:11:28] optimpv.axBOtorchOptimizer: Trial 2 completed with results: {'Hyst1_JV_nrmse_linear': np.float64(0.07631859334391636), 'Hyst2_JV_nrmse_linear': np.float64(0.07011240980144441), 'Hyst3_JV_nrmse_linear': np.float64(0.0688698815826293), 'Hyst4_JV_nrmse_linear': np.float64(0.07199038217545455)} and parameters: {'l2.mu_n': -4.22980966232717, 'l2.mu_p': -4.796986980363727, 'l2.N_t_bulk': 2.84919030738934e+20, 'l1.N_t_int': 216666922211.94626, 'l2.N_t_int': 228816124951.3424, 'l2.N_ions': 3.3382911260490313e+21, 'l2.mu_ions': -12.553506979718804}
[INFO 12-05 18:11:28] optimpv.axBOtorchOptimizer: Trial 3 completed with results: {'Hyst1_JV_nrmse_linear': np.float64(0.06800751655669209), 'Hyst2_JV_nrmse_linear': np.float64(0.06032074604306405), 'Hyst3_JV_nrmse_linear': np.float64(0.057744889586333635), 'Hyst4_JV_nrmse_linear': np.float64(0.06612531278195634)} and parameters: {'l2.mu_n': -4.573989424854517, 'l2.mu_p': -3.1039786096662283, 'l2.N_t_bulk': 8.452515599386762e+19, 'l1.N_t_int': 1202761665242.3528, 'l2.N_t_int': 321007046655.92004, 'l2.N_ions': 1.6541837548920871e+21, 'l2.mu_ions': -11.203693496063352}
[INFO 12-05 18:11:28] optimpv.axBOtorchOptimizer: Trial 4 completed with results: {'Hyst1_JV_nrmse_linear': np.float64(0.10370275912540823), 'Hyst2_JV_nrmse_linear': np.float64(0.09485301826672866), 'Hyst3_JV_nrmse_linear': np.float64(0.08387021474055792), 'Hyst4_JV_nrmse_linear': np.float64(0.10156929947196287)} and parameters: {'l2.mu_n': -3.7493467144668102, 'l2.mu_p': -4.402345523238182, 'l2.N_t_bulk': 7.651487963888279e+20, 'l1.N_t_int': 668906262715.4469, 'l2.N_t_int': 7245243409076.8125, 'l2.N_ions': 9.687610763952673e+20, 'l2.mu_ions': -12.271753719076514}
[INFO 12-05 18:11:28] optimpv.axBOtorchOptimizer: Trial 5 completed with results: {'Hyst1_JV_nrmse_linear': np.float64(0.03853064126032584), 'Hyst2_JV_nrmse_linear': np.float64(0.03120169118624201), 'Hyst3_JV_nrmse_linear': np.float64(0.03494107943956738), 'Hyst4_JV_nrmse_linear': np.float64(0.03744801370446129)} and parameters: {'l2.mu_n': -3.887081665918231, 'l2.mu_p': -3.3770684394985437, 'l2.N_t_bulk': 1.7023326046930253e+20, 'l1.N_t_int': 491002063858.0777, 'l2.N_t_int': 4493775296763.064, 'l2.N_ions': 1.030347104506044e+20, 'l2.mu_ions': -11.37129226885736}
[INFO 12-05 18:11:28] optimpv.axBOtorchOptimizer: Trial 6 completed with results: {'Hyst1_JV_nrmse_linear': np.float64(0.10505125340377147), 'Hyst2_JV_nrmse_linear': np.float64(0.10165915231915977), 'Hyst3_JV_nrmse_linear': np.float64(0.08170051545473803), 'Hyst4_JV_nrmse_linear': np.float64(0.09695023393460159)} and parameters: {'l2.mu_n': -4.805452322587371, 'l2.mu_p': -4.113674435764551, 'l2.N_t_bulk': 1.6011916715432122e+19, 'l1.N_t_int': 2920409864504.167, 'l2.N_t_int': 952506536829.0046, 'l2.N_ions': 6.090559726035827e+21, 'l2.mu_ions': -12.182524057105184}
[INFO 12-05 18:11:28] optimpv.axBOtorchOptimizer: Trial 7 completed with results: {'Hyst1_JV_nrmse_linear': np.float64(0.07798452774620306), 'Hyst2_JV_nrmse_linear': np.float64(0.08048824555196042), 'Hyst3_JV_nrmse_linear': np.float64(0.0861387897933738), 'Hyst4_JV_nrmse_linear': np.float64(0.0768553710852516)} and parameters: {'l2.mu_n': -4.398775655776262, 'l2.mu_p': -3.794933658093214, 'l2.N_t_bulk': 4.75875347716792e+20, 'l1.N_t_int': 163031660905.73312, 'l2.N_t_int': 142311407504.31482, 'l2.N_ions': 2.974326344918287e+21, 'l2.mu_ions': -11.59054603613913}
[INFO 12-05 18:11:28] optimpv.axBOtorchOptimizer: Trial 8 completed with results: {'Hyst1_JV_nrmse_linear': np.float64(0.17977688364236333), 'Hyst2_JV_nrmse_linear': np.float64(0.1819180244612345), 'Hyst3_JV_nrmse_linear': np.float64(0.17998010726749605), 'Hyst4_JV_nrmse_linear': np.float64(0.1830939119848236)} and parameters: {'l2.mu_n': -3.2937621138989925, 'l2.mu_p': -4.711403818801045, 'l2.N_t_bulk': 4.294103158887684e+19, 'l1.N_t_int': 8785580881200.284, 'l2.N_t_int': 3016015739184.822, 'l2.N_ions': 4.986428995175788e+20, 'l2.mu_ions': -12.900800792500377}
[INFO 12-05 18:11:28] optimpv.axBOtorchOptimizer: Trial 9 completed with results: {'Hyst1_JV_nrmse_linear': np.float64(0.1356443523981755), 'Hyst2_JV_nrmse_linear': np.float64(0.1299319773782754), 'Hyst3_JV_nrmse_linear': np.float64(0.12362402070103515), 'Hyst4_JV_nrmse_linear': np.float64(0.13431748617464917)} and parameters: {'l2.mu_n': -3.398669334128499, 'l2.mu_p': -3.20325493440032, 'l2.N_t_bulk': 3.858962260304989e+20, 'l1.N_t_int': 2221233231647.6436, 'l2.N_t_int': 290241468756.08527, 'l2.N_ions': 6.721933208759624e+20, 'l2.mu_ions': -11.489306854084134}
[INFO 12-05 18:11:28] optimpv.axBOtorchOptimizer: Trial 10 completed with results: {'Hyst1_JV_nrmse_linear': np.float64(0.03560108732691422), 'Hyst2_JV_nrmse_linear': np.float64(0.03342530827180019), 'Hyst3_JV_nrmse_linear': np.float64(0.04159548366277207), 'Hyst4_JV_nrmse_linear': np.float64(0.034658283509163564)} and parameters: {'l2.mu_n': -4.2936233673244715, 'l2.mu_p': -4.287457095459104, 'l2.N_t_bulk': 3.970956578046116e+19, 'l1.N_t_int': 419684493710.41095, 'l2.N_t_int': 1484776185561.1582, 'l2.N_ions': 1.244911751592563e+21, 'l2.mu_ions': -12.050656428560615}
[INFO 12-05 18:11:34] optimpv.axBOtorchOptimizer: Trial 11 with parameters: {'l2.mu_n': -5.0, 'l2.mu_p': -3.0, 'l2.N_t_bulk': 1.164573366471447e+19, 'l1.N_t_int': 267430540025.55063, 'l2.N_t_int': 989095289197.223, 'l2.N_ions': 1e+20, 'l2.mu_ions': -11.0}
[INFO 12-05 18:11:34] optimpv.axBOtorchOptimizer: Trial 12 with parameters: {'l2.mu_n': -4.501828894860299, 'l2.mu_p': -3.170079883235088, 'l2.N_t_bulk': 1e+19, 'l1.N_t_int': 167943234317.08286, 'l2.N_t_int': 4133886977107.913, 'l2.N_ions': 1e+20, 'l2.mu_ions': -11.337981409575134}
[INFO 12-05 18:11:49] optimpv.axBOtorchOptimizer: Trial 11 completed with results: {'Hyst1_JV_nrmse_linear': np.float64(0.09267440337266482), 'Hyst2_JV_nrmse_linear': np.float64(0.09208143349701767), 'Hyst3_JV_nrmse_linear': np.float64(0.09675235739539736), 'Hyst4_JV_nrmse_linear': np.float64(0.09305817192069307)} and parameters: {'l2.mu_n': -5.0, 'l2.mu_p': -3.0, 'l2.N_t_bulk': 1.164573366471447e+19, 'l1.N_t_int': 267430540025.55063, 'l2.N_t_int': 989095289197.223, 'l2.N_ions': 1e+20, 'l2.mu_ions': -11.0}
[INFO 12-05 18:11:49] optimpv.axBOtorchOptimizer: Trial 12 completed with results: {'Hyst1_JV_nrmse_linear': np.float64(0.08683772618481085), 'Hyst2_JV_nrmse_linear': np.float64(0.0895898545288793), 'Hyst3_JV_nrmse_linear': np.float64(0.09840102228365774), 'Hyst4_JV_nrmse_linear': np.float64(0.08717029733544872)} and parameters: {'l2.mu_n': -4.501828894860299, 'l2.mu_p': -3.170079883235088, 'l2.N_t_bulk': 1e+19, 'l1.N_t_int': 167943234317.08286, 'l2.N_t_int': 4133886977107.913, 'l2.N_ions': 1e+20, 'l2.mu_ions': -11.337981409575134}
[INFO 12-05 18:11:54] optimpv.axBOtorchOptimizer: Trial 13 with parameters: {'l2.mu_n': -4.169356975338137, 'l2.mu_p': -4.196736372204402, 'l2.N_t_bulk': 3.73816094201088e+20, 'l1.N_t_int': 469580621238.48444, 'l2.N_t_int': 402267397943.7658, 'l2.N_ions': 6.605459841185499e+21, 'l2.mu_ions': -11.402749266453187}
[INFO 12-05 18:11:54] optimpv.axBOtorchOptimizer: Trial 14 with parameters: {'l2.mu_n': -4.086626236030644, 'l2.mu_p': -3.3915166034029247, 'l2.N_t_bulk': 1.0414749900903498e+19, 'l1.N_t_int': 477698265182.87616, 'l2.N_t_int': 4454058346260.72, 'l2.N_ions': 1.1223273656412226e+20, 'l2.mu_ions': -11.128455979599293}
[INFO 12-05 18:12:10] optimpv.axBOtorchOptimizer: Trial 13 completed with results: {'Hyst1_JV_nrmse_linear': np.float64(0.049563438186253965), 'Hyst2_JV_nrmse_linear': np.float64(0.04446194626331174), 'Hyst3_JV_nrmse_linear': np.float64(0.040588125270990844), 'Hyst4_JV_nrmse_linear': np.float64(0.042558271328047674)} and parameters: {'l2.mu_n': -4.169356975338137, 'l2.mu_p': -4.196736372204402, 'l2.N_t_bulk': 3.73816094201088e+20, 'l1.N_t_int': 469580621238.48444, 'l2.N_t_int': 402267397943.7658, 'l2.N_ions': 6.605459841185499e+21, 'l2.mu_ions': -11.402749266453187}
[INFO 12-05 18:12:10] optimpv.axBOtorchOptimizer: Trial 14 completed with results: {'Hyst1_JV_nrmse_linear': np.float64(0.03314725331457593), 'Hyst2_JV_nrmse_linear': np.float64(0.03078484407493445), 'Hyst3_JV_nrmse_linear': np.float64(0.04023159329639202), 'Hyst4_JV_nrmse_linear': np.float64(0.033537934512766904)} and parameters: {'l2.mu_n': -4.086626236030644, 'l2.mu_p': -3.3915166034029247, 'l2.N_t_bulk': 1.0414749900903498e+19, 'l1.N_t_int': 477698265182.87616, 'l2.N_t_int': 4454058346260.72, 'l2.N_ions': 1.1223273656412226e+20, 'l2.mu_ions': -11.128455979599293}
[INFO 12-05 18:12:13] optimpv.axBOtorchOptimizer: Trial 15 with parameters: {'l2.mu_n': -3.969975412231419, 'l2.mu_p': -3.0, 'l2.N_t_bulk': 7.1049311627045724e+19, 'l1.N_t_int': 445548078658.7295, 'l2.N_t_int': 1430920221704.1284, 'l2.N_ions': 3.859522085726482e+21, 'l2.mu_ions': -13.0}
[INFO 12-05 18:12:13] optimpv.axBOtorchOptimizer: Trial 16 with parameters: {'l2.mu_n': -4.3747541825752805, 'l2.mu_p': -3.7458351590852583, 'l2.N_t_bulk': 5.252783061063932e+20, 'l1.N_t_int': 500344084928.234, 'l2.N_t_int': 278862787500.68353, 'l2.N_ions': 3.5761950964232225e+21, 'l2.mu_ions': -12.770840462241459}
[INFO 12-05 18:12:27] optimpv.axBOtorchOptimizer: Trial 15 completed with results: {'Hyst1_JV_nrmse_linear': np.float64(0.03441613294882608), 'Hyst2_JV_nrmse_linear': np.float64(0.03357249610524329), 'Hyst3_JV_nrmse_linear': np.float64(0.05440273453704273), 'Hyst4_JV_nrmse_linear': np.float64(0.030727019484217355)} and parameters: {'l2.mu_n': -3.969975412231419, 'l2.mu_p': -3.0, 'l2.N_t_bulk': 7.1049311627045724e+19, 'l1.N_t_int': 445548078658.7295, 'l2.N_t_int': 1430920221704.1284, 'l2.N_ions': 3.859522085726482e+21, 'l2.mu_ions': -13.0}
[INFO 12-05 18:12:27] optimpv.axBOtorchOptimizer: Trial 16 completed with results: {'Hyst1_JV_nrmse_linear': np.float64(0.06183444890960671), 'Hyst2_JV_nrmse_linear': np.float64(0.04977814676577015), 'Hyst3_JV_nrmse_linear': np.float64(0.04192907387468499), 'Hyst4_JV_nrmse_linear': np.float64(0.0482591348516626)} and parameters: {'l2.mu_n': -4.3747541825752805, 'l2.mu_p': -3.7458351590852583, 'l2.N_t_bulk': 5.252783061063932e+20, 'l1.N_t_int': 500344084928.234, 'l2.N_t_int': 278862787500.68353, 'l2.N_ions': 3.5761950964232225e+21, 'l2.mu_ions': -12.770840462241459}
[INFO 12-05 18:12:32] optimpv.axBOtorchOptimizer: Trial 17 with parameters: {'l2.mu_n': -4.111655999104804, 'l2.mu_p': -3.266929434139804, 'l2.N_t_bulk': 6.576603790729645e+19, 'l1.N_t_int': 435235479319.5573, 'l2.N_t_int': 1702364428652.189, 'l2.N_ions': 2.6662685342267992e+20, 'l2.mu_ions': -11.0}
[INFO 12-05 18:12:32] optimpv.axBOtorchOptimizer: Trial 18 with parameters: {'l2.mu_n': -4.0271617331531795, 'l2.mu_p': -3.3766034475612017, 'l2.N_t_bulk': 5.511896236890907e+19, 'l1.N_t_int': 401440233833.9763, 'l2.N_t_int': 8741616446788.709, 'l2.N_ions': 1.2031669668372137e+21, 'l2.mu_ions': -11.0}
[INFO 12-05 18:12:46] optimpv.axBOtorchOptimizer: Trial 17 completed with results: {'Hyst1_JV_nrmse_linear': np.float64(0.038595061789036086), 'Hyst2_JV_nrmse_linear': np.float64(0.04158083665583702), 'Hyst3_JV_nrmse_linear': np.float64(0.05391578308535056), 'Hyst4_JV_nrmse_linear': np.float64(0.040345599428022946)} and parameters: {'l2.mu_n': -4.111655999104804, 'l2.mu_p': -3.266929434139804, 'l2.N_t_bulk': 6.576603790729645e+19, 'l1.N_t_int': 435235479319.5573, 'l2.N_t_int': 1702364428652.189, 'l2.N_ions': 2.6662685342267992e+20, 'l2.mu_ions': -11.0}
[INFO 12-05 18:12:46] optimpv.axBOtorchOptimizer: Trial 18 completed with results: {'Hyst1_JV_nrmse_linear': np.float64(0.028676640185424273), 'Hyst2_JV_nrmse_linear': np.float64(0.02820227879542596), 'Hyst3_JV_nrmse_linear': np.float64(0.036307224779205415), 'Hyst4_JV_nrmse_linear': np.float64(0.030414182613457783)} and parameters: {'l2.mu_n': -4.0271617331531795, 'l2.mu_p': -3.3766034475612017, 'l2.N_t_bulk': 5.511896236890907e+19, 'l1.N_t_int': 401440233833.9763, 'l2.N_t_int': 8741616446788.709, 'l2.N_ions': 1.2031669668372137e+21, 'l2.mu_ions': -11.0}
[INFO 12-05 18:12:51] optimpv.axBOtorchOptimizer: Trial 19 with parameters: {'l2.mu_n': -3.9033914807684367, 'l2.mu_p': -3.505364002689169, 'l2.N_t_bulk': 1e+19, 'l1.N_t_int': 366683063656.2764, 'l2.N_t_int': 10000000000000.0, 'l2.N_ions': 1e+22, 'l2.mu_ions': -11.465677963739864}
[INFO 12-05 18:12:51] optimpv.axBOtorchOptimizer: Trial 20 with parameters: {'l2.mu_n': -4.012563022144898, 'l2.mu_p': -3.697004675771873, 'l2.N_t_bulk': 1e+19, 'l1.N_t_int': 393655357427.0765, 'l2.N_t_int': 10000000000000.0, 'l2.N_ions': 1e+22, 'l2.mu_ions': -13.0}
[INFO 12-05 18:13:13] optimpv.axBOtorchOptimizer: Trial 19 completed with results: {'Hyst1_JV_nrmse_linear': np.float64(0.03785759416014353), 'Hyst2_JV_nrmse_linear': np.float64(0.034979529364701466), 'Hyst3_JV_nrmse_linear': np.float64(0.03463984922221251), 'Hyst4_JV_nrmse_linear': np.float64(0.04126732096953135)} and parameters: {'l2.mu_n': -3.9033914807684367, 'l2.mu_p': -3.505364002689169, 'l2.N_t_bulk': 1e+19, 'l1.N_t_int': 366683063656.2764, 'l2.N_t_int': 10000000000000.0, 'l2.N_ions': 1e+22, 'l2.mu_ions': -11.465677963739864}
[INFO 12-05 18:13:13] optimpv.axBOtorchOptimizer: Trial 20 completed with results: {'Hyst1_JV_nrmse_linear': np.float64(0.06453917325093982), 'Hyst2_JV_nrmse_linear': np.float64(0.026716618611725255), 'Hyst3_JV_nrmse_linear': np.float64(0.061014102392294337), 'Hyst4_JV_nrmse_linear': np.float64(0.035432639437025064)} and parameters: {'l2.mu_n': -4.012563022144898, 'l2.mu_p': -3.697004675771873, 'l2.N_t_bulk': 1e+19, 'l1.N_t_int': 393655357427.0765, 'l2.N_t_int': 10000000000000.0, 'l2.N_ions': 1e+22, 'l2.mu_ions': -13.0}
[INFO 12-05 18:13:16] optimpv.axBOtorchOptimizer: Trial 21 with parameters: {'l2.mu_n': -3.957034272434596, 'l2.mu_p': -3.216817253047142, 'l2.N_t_bulk': 1e+19, 'l1.N_t_int': 417307735023.8069, 'l2.N_t_int': 10000000000000.0, 'l2.N_ions': 1e+20, 'l2.mu_ions': -11.681470696576651}
[INFO 12-05 18:13:16] optimpv.axBOtorchOptimizer: Trial 22 with parameters: {'l2.mu_n': -3.8934306614393215, 'l2.mu_p': -3.0, 'l2.N_t_bulk': 1e+19, 'l1.N_t_int': 411178792167.73566, 'l2.N_t_int': 10000000000000.0, 'l2.N_ions': 1e+20, 'l2.mu_ions': -11.208477374630963}
[INFO 12-05 18:13:29] optimpv.axBOtorchOptimizer: Trial 21 completed with results: {'Hyst1_JV_nrmse_linear': np.float64(0.03178117000877791), 'Hyst2_JV_nrmse_linear': np.float64(0.028709408381596566), 'Hyst3_JV_nrmse_linear': np.float64(0.038232340128339766), 'Hyst4_JV_nrmse_linear': np.float64(0.031762133839677895)} and parameters: {'l2.mu_n': -3.957034272434596, 'l2.mu_p': -3.216817253047142, 'l2.N_t_bulk': 1e+19, 'l1.N_t_int': 417307735023.8069, 'l2.N_t_int': 10000000000000.0, 'l2.N_ions': 1e+20, 'l2.mu_ions': -11.681470696576651}
[INFO 12-05 18:13:29] optimpv.axBOtorchOptimizer: Trial 22 completed with results: {'Hyst1_JV_nrmse_linear': np.float64(0.026280668980565226), 'Hyst2_JV_nrmse_linear': np.float64(0.026452059011301852), 'Hyst3_JV_nrmse_linear': np.float64(0.03971868424715844), 'Hyst4_JV_nrmse_linear': np.float64(0.027095339450964272)} and parameters: {'l2.mu_n': -3.8934306614393215, 'l2.mu_p': -3.0, 'l2.N_t_bulk': 1e+19, 'l1.N_t_int': 411178792167.73566, 'l2.N_t_int': 10000000000000.0, 'l2.N_ions': 1e+20, 'l2.mu_ions': -11.208477374630963}
[INFO 12-05 18:13:35] optimpv.axBOtorchOptimizer: Trial 23 with parameters: {'l2.mu_n': -3.8729298928365568, 'l2.mu_p': -3.0, 'l2.N_t_bulk': 1e+21, 'l1.N_t_int': 447095366025.8019, 'l2.N_t_int': 10000000000000.0, 'l2.N_ions': 1e+22, 'l2.mu_ions': -11.0}
[INFO 12-05 18:13:35] optimpv.axBOtorchOptimizer: Trial 24 with parameters: {'l2.mu_n': -3.8295279978457946, 'l2.mu_p': -3.0, 'l2.N_t_bulk': 4.073131731671534e+19, 'l1.N_t_int': 400468741712.4081, 'l2.N_t_int': 10000000000000.0, 'l2.N_ions': 1.7129458533849357e+20, 'l2.mu_ions': -11.0}
[INFO 12-05 18:13:55] optimpv.axBOtorchOptimizer: Trial 23 completed with results: {'Hyst1_JV_nrmse_linear': np.float64(0.0142185966670147), 'Hyst2_JV_nrmse_linear': np.float64(0.011377220639049864), 'Hyst3_JV_nrmse_linear': np.float64(0.028041567168129895), 'Hyst4_JV_nrmse_linear': np.float64(0.021992001657318714)} and parameters: {'l2.mu_n': -3.8729298928365568, 'l2.mu_p': -3.0, 'l2.N_t_bulk': 1e+21, 'l1.N_t_int': 447095366025.8019, 'l2.N_t_int': 10000000000000.0, 'l2.N_ions': 1e+22, 'l2.mu_ions': -11.0}
[INFO 12-05 18:13:55] optimpv.axBOtorchOptimizer: Trial 24 completed with results: {'Hyst1_JV_nrmse_linear': np.float64(0.024897996338725758), 'Hyst2_JV_nrmse_linear': np.float64(0.025592280472195503), 'Hyst3_JV_nrmse_linear': np.float64(0.03927550529315378), 'Hyst4_JV_nrmse_linear': np.float64(0.025939868276366622)} and parameters: {'l2.mu_n': -3.8295279978457946, 'l2.mu_p': -3.0, 'l2.N_t_bulk': 4.073131731671534e+19, 'l1.N_t_int': 400468741712.4081, 'l2.N_t_int': 10000000000000.0, 'l2.N_ions': 1.7129458533849357e+20, 'l2.mu_ions': -11.0}
[INFO 12-05 18:13:58] optimpv.axBOtorchOptimizer: Trial 25 with parameters: {'l2.mu_n': -3.904806870730216, 'l2.mu_p': -3.0, 'l2.N_t_bulk': 1e+21, 'l1.N_t_int': 507987724555.92017, 'l2.N_t_int': 10000000000000.0, 'l2.N_ions': 1e+22, 'l2.mu_ions': -11.0}
[INFO 12-05 18:13:58] optimpv.axBOtorchOptimizer: Trial 26 with parameters: {'l2.mu_n': -3.925931001972768, 'l2.mu_p': -3.4954798878235565, 'l2.N_t_bulk': 1e+19, 'l1.N_t_int': 316511845079.67975, 'l2.N_t_int': 4018945594990.3706, 'l2.N_ions': 1e+20, 'l2.mu_ions': -11.879281952010022}
[INFO 12-05 18:14:22] optimpv.axBOtorchOptimizer: Trial 25 completed with results: {'Hyst1_JV_nrmse_linear': np.float64(0.02522501101844967), 'Hyst2_JV_nrmse_linear': np.float64(0.021555364605901687), 'Hyst3_JV_nrmse_linear': np.float64(0.03128463980672405), 'Hyst4_JV_nrmse_linear': np.float64(0.031012414846123087)} and parameters: {'l2.mu_n': -3.904806870730216, 'l2.mu_p': -3.0, 'l2.N_t_bulk': 1e+21, 'l1.N_t_int': 507987724555.92017, 'l2.N_t_int': 10000000000000.0, 'l2.N_ions': 1e+22, 'l2.mu_ions': -11.0}
[INFO 12-05 18:14:22] optimpv.axBOtorchOptimizer: Trial 26 completed with results: {'Hyst1_JV_nrmse_linear': np.float64(0.042551384723601364), 'Hyst2_JV_nrmse_linear': np.float64(0.047034740835556796), 'Hyst3_JV_nrmse_linear': np.float64(0.060811630439294946), 'Hyst4_JV_nrmse_linear': np.float64(0.04431798028649967)} and parameters: {'l2.mu_n': -3.925931001972768, 'l2.mu_p': -3.4954798878235565, 'l2.N_t_bulk': 1e+19, 'l1.N_t_int': 316511845079.67975, 'l2.N_t_int': 4018945594990.3706, 'l2.N_ions': 1e+20, 'l2.mu_ions': -11.879281952010022}
[INFO 12-05 18:14:28] optimpv.axBOtorchOptimizer: Trial 27 with parameters: {'l2.mu_n': -4.558223991058439, 'l2.mu_p': -4.552630750759416, 'l2.N_t_bulk': 1e+21, 'l1.N_t_int': 522674251922.7936, 'l2.N_t_int': 10000000000000.0, 'l2.N_ions': 1e+22, 'l2.mu_ions': -11.0}
[INFO 12-05 18:14:28] optimpv.axBOtorchOptimizer: Trial 28 with parameters: {'l2.mu_n': -4.238200975334448, 'l2.mu_p': -4.206250285131884, 'l2.N_t_bulk': 2.2085683467808158e+19, 'l1.N_t_int': 403052993402.916, 'l2.N_t_int': 948988344306.172, 'l2.N_ions': 8.790932014320438e+20, 'l2.mu_ions': -12.290969054570485}
An unhandled exception occurred at $000000000040410A:
EOverflow: Floating point overflow
  $000000000040410A
  $00000000004307A4
  $0000000000441906
  $00000000004451F1
  $0000000000402953

[INFO 12-05 18:15:10] optimpv.axBOtorchOptimizer: Trial 27 failed with results: {'Hyst1_JV_nrmse_linear': np.float64(0.10255345467342729), 'Hyst2_JV_nrmse_linear': np.float64(0.0922480257100276), 'Hyst3_JV_nrmse_linear': nan, 'Hyst4_JV_nrmse_linear': np.float64(0.08908226802261573)} and parameters: {'l2.mu_n': -4.558223991058439, 'l2.mu_p': -4.552630750759416, 'l2.N_t_bulk': 1e+21, 'l1.N_t_int': 522674251922.7936, 'l2.N_t_int': 10000000000000.0, 'l2.N_ions': 1e+22, 'l2.mu_ions': -11.0}
[INFO 12-05 18:15:10] optimpv.axBOtorchOptimizer: Trial 28 completed with results: {'Hyst1_JV_nrmse_linear': np.float64(0.03371678818501685), 'Hyst2_JV_nrmse_linear': np.float64(0.03509689532475752), 'Hyst3_JV_nrmse_linear': np.float64(0.049307191838500325), 'Hyst4_JV_nrmse_linear': np.float64(0.034749235449421864)} and parameters: {'l2.mu_n': -4.238200975334448, 'l2.mu_p': -4.206250285131884, 'l2.N_t_bulk': 2.2085683467808158e+19, 'l1.N_t_int': 403052993402.916, 'l2.N_t_int': 948988344306.172, 'l2.N_ions': 8.790932014320438e+20, 'l2.mu_ions': -12.290969054570485}
[INFO 12-05 18:15:14] optimpv.axBOtorchOptimizer: Trial 29 with parameters: {'l2.mu_n': -3.862719396781796, 'l2.mu_p': -3.0, 'l2.N_t_bulk': 1e+21, 'l1.N_t_int': 461945004521.05756, 'l2.N_t_int': 10000000000000.0, 'l2.N_ions': 1e+22, 'l2.mu_ions': -11.0}
[INFO 12-05 18:15:14] optimpv.axBOtorchOptimizer: Trial 30 with parameters: {'l2.mu_n': -4.559420141408775, 'l2.mu_p': -4.562395992100173, 'l2.N_t_bulk': 1e+19, 'l1.N_t_int': 515651514323.94763, 'l2.N_t_int': 10000000000000.0, 'l2.N_ions': 1e+22, 'l2.mu_ions': -11.0}
An unhandled exception occurred at $000000000040410A:
EOverflow: Floating point overflow
  $000000000040410A
  $00000000004307A4
  $0000000000441906
  $00000000004451F1
  $0000000000402953

[INFO 12-05 18:15:59] optimpv.axBOtorchOptimizer: Trial 29 completed with results: {'Hyst1_JV_nrmse_linear': np.float64(0.016845241555416154), 'Hyst2_JV_nrmse_linear': np.float64(0.01365491503672223), 'Hyst3_JV_nrmse_linear': np.float64(0.027868025860667122), 'Hyst4_JV_nrmse_linear': np.float64(0.024194290453391044)} and parameters: {'l2.mu_n': -3.862719396781796, 'l2.mu_p': -3.0, 'l2.N_t_bulk': 1e+21, 'l1.N_t_int': 461945004521.05756, 'l2.N_t_int': 10000000000000.0, 'l2.N_ions': 1e+22, 'l2.mu_ions': -11.0}
[INFO 12-05 18:15:59] optimpv.axBOtorchOptimizer: Trial 30 failed with results: {'Hyst1_JV_nrmse_linear': np.float64(0.04435924055902861), 'Hyst2_JV_nrmse_linear': np.float64(0.04241571042446783), 'Hyst3_JV_nrmse_linear': nan, 'Hyst4_JV_nrmse_linear': np.float64(0.048696475305308996)} and parameters: {'l2.mu_n': -4.559420141408775, 'l2.mu_p': -4.562395992100173, 'l2.N_t_bulk': 1e+19, 'l1.N_t_int': 515651514323.94763, 'l2.N_t_int': 10000000000000.0, 'l2.N_ions': 1e+22, 'l2.mu_ions': -11.0}
[INFO 12-05 18:16:07] optimpv.axBOtorchOptimizer: Trial 31 with parameters: {'l2.mu_n': -3.8177336825202977, 'l2.mu_p': -3.0, 'l2.N_t_bulk': 1e+21, 'l1.N_t_int': 440529515424.6598, 'l2.N_t_int': 10000000000000.0, 'l2.N_ions': 1e+22, 'l2.mu_ions': -11.0}
[INFO 12-05 18:16:07] optimpv.axBOtorchOptimizer: Trial 32 with parameters: {'l2.mu_n': -3.719008707287913, 'l2.mu_p': -3.0468284952285765, 'l2.N_t_bulk': 1e+21, 'l1.N_t_int': 486577066513.9646, 'l2.N_t_int': 10000000000000.0, 'l2.N_ions': 1e+22, 'l2.mu_ions': -11.500643836786784}
[INFO 12-05 18:16:25] optimpv.axBOtorchOptimizer: Trial 31 completed with results: {'Hyst1_JV_nrmse_linear': np.float64(0.013314450633822233), 'Hyst2_JV_nrmse_linear': np.float64(0.010522470691286727), 'Hyst3_JV_nrmse_linear': np.float64(0.026305221737226304), 'Hyst4_JV_nrmse_linear': np.float64(0.021336272819005853)} and parameters: {'l2.mu_n': -3.8177336825202977, 'l2.mu_p': -3.0, 'l2.N_t_bulk': 1e+21, 'l1.N_t_int': 440529515424.6598, 'l2.N_t_int': 10000000000000.0, 'l2.N_ions': 1e+22, 'l2.mu_ions': -11.0}
[INFO 12-05 18:16:25] optimpv.axBOtorchOptimizer: Trial 32 completed with results: {'Hyst1_JV_nrmse_linear': np.float64(0.02511023026285992), 'Hyst2_JV_nrmse_linear': np.float64(0.03341922877071172), 'Hyst3_JV_nrmse_linear': np.float64(0.01972181977822236), 'Hyst4_JV_nrmse_linear': np.float64(0.019678213012961174)} and parameters: {'l2.mu_n': -3.719008707287913, 'l2.mu_p': -3.0468284952285765, 'l2.N_t_bulk': 1e+21, 'l1.N_t_int': 486577066513.9646, 'l2.N_t_int': 10000000000000.0, 'l2.N_ions': 1e+22, 'l2.mu_ions': -11.500643836786784}
[INFO 12-05 18:16:32] optimpv.axBOtorchOptimizer: Trial 33 with parameters: {'l2.mu_n': -3.758172118369956, 'l2.mu_p': -3.0, 'l2.N_t_bulk': 1e+21, 'l1.N_t_int': 435789339508.133, 'l2.N_t_int': 10000000000000.0, 'l2.N_ions': 1e+22, 'l2.mu_ions': -11.21071999838706}
[INFO 12-05 18:16:32] optimpv.axBOtorchOptimizer: Trial 34 with parameters: {'l2.mu_n': -3.9536833318586826, 'l2.mu_p': -3.0552894060019664, 'l2.N_t_bulk': 5.4727909731871834e+19, 'l1.N_t_int': 494653982049.43286, 'l2.N_t_int': 9789900338371.209, 'l2.N_ions': 7.001118307690351e+20, 'l2.mu_ions': -11.0}
[INFO 12-05 18:16:48] optimpv.axBOtorchOptimizer: Trial 33 completed with results: {'Hyst1_JV_nrmse_linear': np.float64(0.012975232708821224), 'Hyst2_JV_nrmse_linear': np.float64(0.016168633780489095), 'Hyst3_JV_nrmse_linear': np.float64(0.02339611976861125), 'Hyst4_JV_nrmse_linear': np.float64(0.01307429184837021)} and parameters: {'l2.mu_n': -3.758172118369956, 'l2.mu_p': -3.0, 'l2.N_t_bulk': 1e+21, 'l1.N_t_int': 435789339508.133, 'l2.N_t_int': 10000000000000.0, 'l2.N_ions': 1e+22, 'l2.mu_ions': -11.21071999838706}
[INFO 12-05 18:16:48] optimpv.axBOtorchOptimizer: Trial 34 completed with results: {'Hyst1_JV_nrmse_linear': np.float64(0.031746431188303864), 'Hyst2_JV_nrmse_linear': np.float64(0.026099673715575457), 'Hyst3_JV_nrmse_linear': np.float64(0.031585784323143004), 'Hyst4_JV_nrmse_linear': np.float64(0.031550892777356405)} and parameters: {'l2.mu_n': -3.9536833318586826, 'l2.mu_p': -3.0552894060019664, 'l2.N_t_bulk': 5.4727909731871834e+19, 'l1.N_t_int': 494653982049.43286, 'l2.N_t_int': 9789900338371.209, 'l2.N_ions': 7.001118307690351e+20, 'l2.mu_ions': -11.0}
[INFO 12-05 18:16:54] optimpv.axBOtorchOptimizer: Trial 35 with parameters: {'l2.mu_n': -3.754621880416363, 'l2.mu_p': -3.0, 'l2.N_t_bulk': 1e+21, 'l1.N_t_int': 400311213613.90344, 'l2.N_t_int': 10000000000000.0, 'l2.N_ions': 1e+22, 'l2.mu_ions': -11.420444420172425}
[INFO 12-05 18:16:54] optimpv.axBOtorchOptimizer: Trial 36 with parameters: {'l2.mu_n': -3.7096181108614714, 'l2.mu_p': -3.0, 'l2.N_t_bulk': 1e+21, 'l1.N_t_int': 404303543444.7148, 'l2.N_t_int': 10000000000000.0, 'l2.N_ions': 1e+22, 'l2.mu_ions': -11.0}
[INFO 12-05 18:17:11] optimpv.axBOtorchOptimizer: Trial 35 completed with results: {'Hyst1_JV_nrmse_linear': np.float64(0.01074548338557425), 'Hyst2_JV_nrmse_linear': np.float64(0.02106717345317948), 'Hyst3_JV_nrmse_linear': np.float64(0.021413864129287308), 'Hyst4_JV_nrmse_linear': np.float64(0.007114948058304656)} and parameters: {'l2.mu_n': -3.754621880416363, 'l2.mu_p': -3.0, 'l2.N_t_bulk': 1e+21, 'l1.N_t_int': 400311213613.90344, 'l2.N_t_int': 10000000000000.0, 'l2.N_ions': 1e+22, 'l2.mu_ions': -11.420444420172425}
[INFO 12-05 18:17:11] optimpv.axBOtorchOptimizer: Trial 36 completed with results: {'Hyst1_JV_nrmse_linear': np.float64(0.009870255757409855), 'Hyst2_JV_nrmse_linear': np.float64(0.008751044443218394), 'Hyst3_JV_nrmse_linear': np.float64(0.024362803358939276), 'Hyst4_JV_nrmse_linear': np.float64(0.017440283251640026)} and parameters: {'l2.mu_n': -3.7096181108614714, 'l2.mu_p': -3.0, 'l2.N_t_bulk': 1e+21, 'l1.N_t_int': 404303543444.7148, 'l2.N_t_int': 10000000000000.0, 'l2.N_ions': 1e+22, 'l2.mu_ions': -11.0}
[INFO 12-05 18:17:16] optimpv.axBOtorchOptimizer: Trial 37 with parameters: {'l2.mu_n': -3.683258399053639, 'l2.mu_p': -3.0, 'l2.N_t_bulk': 1e+21, 'l1.N_t_int': 379556010309.23413, 'l2.N_t_int': 10000000000000.0, 'l2.N_ions': 1e+22, 'l2.mu_ions': -11.443934316845548}
[INFO 12-05 18:17:16] optimpv.axBOtorchOptimizer: Trial 38 with parameters: {'l2.mu_n': -3.9175662491401644, 'l2.mu_p': -3.044786678763116, 'l2.N_t_bulk': 8.829591414474839e+20, 'l1.N_t_int': 508942415353.6886, 'l2.N_t_int': 9270161028352.186, 'l2.N_ions': 5.93254080474698e+21, 'l2.mu_ions': -11.0}
[INFO 12-05 18:17:33] optimpv.axBOtorchOptimizer: Trial 37 completed with results: {'Hyst1_JV_nrmse_linear': np.float64(0.012268378090440178), 'Hyst2_JV_nrmse_linear': np.float64(0.021343057753015645), 'Hyst3_JV_nrmse_linear': np.float64(0.021733096523605812), 'Hyst4_JV_nrmse_linear': np.float64(0.010771855637854025)} and parameters: {'l2.mu_n': -3.683258399053639, 'l2.mu_p': -3.0, 'l2.N_t_bulk': 1e+21, 'l1.N_t_int': 379556010309.23413, 'l2.N_t_int': 10000000000000.0, 'l2.N_ions': 1e+22, 'l2.mu_ions': -11.443934316845548}
[INFO 12-05 18:17:33] optimpv.axBOtorchOptimizer: Trial 38 completed with results: {'Hyst1_JV_nrmse_linear': np.float64(0.0359580319756808), 'Hyst2_JV_nrmse_linear': np.float64(0.030731514997572425), 'Hyst3_JV_nrmse_linear': np.float64(0.032861867766099145), 'Hyst4_JV_nrmse_linear': np.float64(0.039162193296987016)} and parameters: {'l2.mu_n': -3.9175662491401644, 'l2.mu_p': -3.044786678763116, 'l2.N_t_bulk': 8.829591414474839e+20, 'l1.N_t_int': 508942415353.6886, 'l2.N_t_int': 9270161028352.186, 'l2.N_ions': 5.93254080474698e+21, 'l2.mu_ions': -11.0}
[INFO 12-05 18:17:38] optimpv.axBOtorchOptimizer: Trial 39 with parameters: {'l2.mu_n': -3.7417425574019276, 'l2.mu_p': -3.0, 'l2.N_t_bulk': 3.333505080486068e+20, 'l1.N_t_int': 393863163993.5925, 'l2.N_t_int': 10000000000000.0, 'l2.N_ions': 1e+22, 'l2.mu_ions': -11.342472437643595}
[INFO 12-05 18:17:38] optimpv.axBOtorchOptimizer: Trial 40 with parameters: {'l2.mu_n': -3.6298895853721813, 'l2.mu_p': -3.0, 'l2.N_t_bulk': 2.8700077100844977e+20, 'l1.N_t_int': 395948347357.9833, 'l2.N_t_int': 10000000000000.0, 'l2.N_ions': 1e+22, 'l2.mu_ions': -11.141425469388075}
[INFO 12-05 18:17:54] optimpv.axBOtorchOptimizer: Trial 39 completed with results: {'Hyst1_JV_nrmse_linear': np.float64(0.024772851688297397), 'Hyst2_JV_nrmse_linear': np.float64(0.022822179482792755), 'Hyst3_JV_nrmse_linear': np.float64(0.026574813702776295), 'Hyst4_JV_nrmse_linear': np.float64(0.025555540813322182)} and parameters: {'l2.mu_n': -3.7417425574019276, 'l2.mu_p': -3.0, 'l2.N_t_bulk': 3.333505080486068e+20, 'l1.N_t_int': 393863163993.5925, 'l2.N_t_int': 10000000000000.0, 'l2.N_ions': 1e+22, 'l2.mu_ions': -11.342472437643595}
[INFO 12-05 18:17:54] optimpv.axBOtorchOptimizer: Trial 40 completed with results: {'Hyst1_JV_nrmse_linear': np.float64(0.025564867227588984), 'Hyst2_JV_nrmse_linear': np.float64(0.025694250307336255), 'Hyst3_JV_nrmse_linear': np.float64(0.024898896436787242), 'Hyst4_JV_nrmse_linear': np.float64(0.02267170656116251)} and parameters: {'l2.mu_n': -3.6298895853721813, 'l2.mu_p': -3.0, 'l2.N_t_bulk': 2.8700077100844977e+20, 'l1.N_t_int': 395948347357.9833, 'l2.N_t_int': 10000000000000.0, 'l2.N_ions': 1e+22, 'l2.mu_ions': -11.141425469388075}
[INFO 12-05 18:17:58] optimpv.axBOtorchOptimizer: Trial 41 with parameters: {'l2.mu_n': -3.220219808070251, 'l2.mu_p': -3.0, 'l2.N_t_bulk': 1.6664115921180353e+19, 'l1.N_t_int': 503527242356.4175, 'l2.N_t_int': 10000000000000.0, 'l2.N_ions': 1e+20, 'l2.mu_ions': -11.0}
[INFO 12-05 18:17:58] optimpv.axBOtorchOptimizer: Trial 42 with parameters: {'l2.mu_n': -4.128485410157854, 'l2.mu_p': -3.3544884203447736, 'l2.N_t_bulk': 6.71813281225166e+19, 'l1.N_t_int': 437551554851.1287, 'l2.N_t_int': 1312152105529.8486, 'l2.N_ions': 2.822644519489126e+20, 'l2.mu_ions': -11.02601112565616}
[INFO 12-05 18:18:11] optimpv.axBOtorchOptimizer: Trial 41 completed with results: {'Hyst1_JV_nrmse_linear': np.float64(0.03743982725298403), 'Hyst2_JV_nrmse_linear': np.float64(0.031090055972633934), 'Hyst3_JV_nrmse_linear': np.float64(0.03360189570338261), 'Hyst4_JV_nrmse_linear': np.float64(0.035575988815489706)} and parameters: {'l2.mu_n': -3.220219808070251, 'l2.mu_p': -3.0, 'l2.N_t_bulk': 1.6664115921180353e+19, 'l1.N_t_int': 503527242356.4175, 'l2.N_t_int': 10000000000000.0, 'l2.N_ions': 1e+20, 'l2.mu_ions': -11.0}
[INFO 12-05 18:18:11] optimpv.axBOtorchOptimizer: Trial 42 completed with results: {'Hyst1_JV_nrmse_linear': np.float64(0.03885687093757065), 'Hyst2_JV_nrmse_linear': np.float64(0.041764402486937975), 'Hyst3_JV_nrmse_linear': np.float64(0.05402377678327521), 'Hyst4_JV_nrmse_linear': np.float64(0.040586406251165996)} and parameters: {'l2.mu_n': -4.128485410157854, 'l2.mu_p': -3.3544884203447736, 'l2.N_t_bulk': 6.71813281225166e+19, 'l1.N_t_int': 437551554851.1287, 'l2.N_t_int': 1312152105529.8486, 'l2.N_ions': 2.822644519489126e+20, 'l2.mu_ions': -11.02601112565616}
[INFO 12-05 18:18:14] optimpv.axBOtorchOptimizer: Trial 43 with parameters: {'l2.mu_n': -3.542331809151619, 'l2.mu_p': -3.0, 'l2.N_t_bulk': 1e+21, 'l1.N_t_int': 392725762873.45886, 'l2.N_t_int': 10000000000000.0, 'l2.N_ions': 1e+22, 'l2.mu_ions': -11.28706933612387}
[INFO 12-05 18:18:14] optimpv.axBOtorchOptimizer: Trial 44 with parameters: {'l2.mu_n': -3.3674583930526056, 'l2.mu_p': -4.062062220604741, 'l2.N_t_bulk': 9.685986853630293e+19, 'l1.N_t_int': 252005495843.57568, 'l2.N_t_int': 8231125225129.433, 'l2.N_ions': 5.001695611483863e+21, 'l2.mu_ions': -12.831069334487518}
[INFO 12-05 18:18:31] optimpv.axBOtorchOptimizer: Trial 43 completed with results: {'Hyst1_JV_nrmse_linear': np.float64(0.00968946683624645), 'Hyst2_JV_nrmse_linear': np.float64(0.014940445806584142), 'Hyst3_JV_nrmse_linear': np.float64(0.018276020500573947), 'Hyst4_JV_nrmse_linear': np.float64(0.006818382137226131)} and parameters: {'l2.mu_n': -3.542331809151619, 'l2.mu_p': -3.0, 'l2.N_t_bulk': 1e+21, 'l1.N_t_int': 392725762873.45886, 'l2.N_t_int': 10000000000000.0, 'l2.N_ions': 1e+22, 'l2.mu_ions': -11.28706933612387}
[INFO 12-05 18:18:31] optimpv.axBOtorchOptimizer: Trial 44 completed with results: {'Hyst1_JV_nrmse_linear': np.float64(0.05645499970396724), 'Hyst2_JV_nrmse_linear': np.float64(0.04300207095965457), 'Hyst3_JV_nrmse_linear': np.float64(0.06372563914321806), 'Hyst4_JV_nrmse_linear': np.float64(0.04871920370968782)} and parameters: {'l2.mu_n': -3.3674583930526056, 'l2.mu_p': -4.062062220604741, 'l2.N_t_bulk': 9.685986853630293e+19, 'l1.N_t_int': 252005495843.57568, 'l2.N_t_int': 8231125225129.433, 'l2.N_ions': 5.001695611483863e+21, 'l2.mu_ions': -12.831069334487518}
[INFO 12-05 18:18:35] optimpv.axBOtorchOptimizer: Trial 45 with parameters: {'l2.mu_n': -3.3581107627781264, 'l2.mu_p': -3.0, 'l2.N_t_bulk': 1e+21, 'l1.N_t_int': 363027598976.42316, 'l2.N_t_int': 10000000000000.0, 'l2.N_ions': 1e+22, 'l2.mu_ions': -11.0}
[INFO 12-05 18:18:35] optimpv.axBOtorchOptimizer: Trial 46 with parameters: {'l2.mu_n': -3.812747064457514, 'l2.mu_p': -3.010156370148947, 'l2.N_t_bulk': 8.493763795762347e+20, 'l1.N_t_int': 419964887602.55005, 'l2.N_t_int': 9633104652559.713, 'l2.N_ions': 9.846852247745236e+21, 'l2.mu_ions': -11.42522080351527}
[INFO 12-05 18:18:52] optimpv.axBOtorchOptimizer: Trial 45 completed with results: {'Hyst1_JV_nrmse_linear': np.float64(0.01401928175500962), 'Hyst2_JV_nrmse_linear': np.float64(0.013955094632391401), 'Hyst3_JV_nrmse_linear': np.float64(0.021186678521751347), 'Hyst4_JV_nrmse_linear': np.float64(0.01604168600012447)} and parameters: {'l2.mu_n': -3.3581107627781264, 'l2.mu_p': -3.0, 'l2.N_t_bulk': 1e+21, 'l1.N_t_int': 363027598976.42316, 'l2.N_t_int': 10000000000000.0, 'l2.N_ions': 1e+22, 'l2.mu_ions': -11.0}
[INFO 12-05 18:18:52] optimpv.axBOtorchOptimizer: Trial 46 completed with results: {'Hyst1_JV_nrmse_linear': np.float64(0.009744742580411017), 'Hyst2_JV_nrmse_linear': np.float64(0.020324265500232683), 'Hyst3_JV_nrmse_linear': np.float64(0.021101626200911296), 'Hyst4_JV_nrmse_linear': np.float64(0.006395232608971956)} and parameters: {'l2.mu_n': -3.812747064457514, 'l2.mu_p': -3.010156370148947, 'l2.N_t_bulk': 8.493763795762347e+20, 'l1.N_t_int': 419964887602.55005, 'l2.N_t_int': 9633104652559.713, 'l2.N_ions': 9.846852247745236e+21, 'l2.mu_ions': -11.42522080351527}
[INFO 12-05 18:18:56] optimpv.axBOtorchOptimizer: Trial 47 with parameters: {'l2.mu_n': -3.0, 'l2.mu_p': -5.0, 'l2.N_t_bulk': 1e+21, 'l1.N_t_int': 382540353677.69055, 'l2.N_t_int': 10000000000000.0, 'l2.N_ions': 1e+20, 'l2.mu_ions': -11.45104410129342}
[INFO 12-05 18:18:56] optimpv.axBOtorchOptimizer: Trial 48 with parameters: {'l2.mu_n': -3.91737559091961, 'l2.mu_p': -3.076799029395345, 'l2.N_t_bulk': 1.7129881656730763e+20, 'l1.N_t_int': 496605215862.8395, 'l2.N_t_int': 4207336701121.0996, 'l2.N_ions': 2.2423426012335204e+20, 'l2.mu_ions': -11.400912184550176}
[INFO 12-05 18:20:19] optimpv.axBOtorchOptimizer: Trial 47 completed with results: {'Hyst1_JV_nrmse_linear': np.float64(0.11168335086809687), 'Hyst2_JV_nrmse_linear': np.float64(0.10253395279905443), 'Hyst3_JV_nrmse_linear': np.float64(0.08765083537990098), 'Hyst4_JV_nrmse_linear': np.float64(0.11254850043407531)} and parameters: {'l2.mu_n': -3.0, 'l2.mu_p': -5.0, 'l2.N_t_bulk': 1e+21, 'l1.N_t_int': 382540353677.69055, 'l2.N_t_int': 10000000000000.0, 'l2.N_ions': 1e+20, 'l2.mu_ions': -11.45104410129342}
[INFO 12-05 18:20:19] optimpv.axBOtorchOptimizer: Trial 48 completed with results: {'Hyst1_JV_nrmse_linear': np.float64(0.03162515155019211), 'Hyst2_JV_nrmse_linear': np.float64(0.02790173350552925), 'Hyst3_JV_nrmse_linear': np.float64(0.03689921746842746), 'Hyst4_JV_nrmse_linear': np.float64(0.0314664964234169)} and parameters: {'l2.mu_n': -3.91737559091961, 'l2.mu_p': -3.076799029395345, 'l2.N_t_bulk': 1.7129881656730763e+20, 'l1.N_t_int': 496605215862.8395, 'l2.N_t_int': 4207336701121.0996, 'l2.N_ions': 2.2423426012335204e+20, 'l2.mu_ions': -11.400912184550176}
[INFO 12-05 18:20:22] optimpv.axBOtorchOptimizer: Trial 49 with parameters: {'l2.mu_n': -3.6158902314227914, 'l2.mu_p': -3.0, 'l2.N_t_bulk': 1e+21, 'l1.N_t_int': 375440280753.2427, 'l2.N_t_int': 10000000000000.0, 'l2.N_ions': 1e+22, 'l2.mu_ions': -11.218158294976394}
[INFO 12-05 18:20:22] optimpv.axBOtorchOptimizer: Trial 50 with parameters: {'l2.mu_n': -3.0922545673672177, 'l2.mu_p': -3.0, 'l2.N_t_bulk': 2.7614667608574607e+20, 'l1.N_t_int': 462074194783.0188, 'l2.N_t_int': 10000000000000.0, 'l2.N_ions': 1e+22, 'l2.mu_ions': -11.0}
[INFO 12-05 18:20:39] optimpv.axBOtorchOptimizer: Trial 49 completed with results: {'Hyst1_JV_nrmse_linear': np.float64(0.012481780040369532), 'Hyst2_JV_nrmse_linear': np.float64(0.01446878043936847), 'Hyst3_JV_nrmse_linear': np.float64(0.023449214544765357), 'Hyst4_JV_nrmse_linear': np.float64(0.010019497566867786)} and parameters: {'l2.mu_n': -3.6158902314227914, 'l2.mu_p': -3.0, 'l2.N_t_bulk': 1e+21, 'l1.N_t_int': 375440280753.2427, 'l2.N_t_int': 10000000000000.0, 'l2.N_ions': 1e+22, 'l2.mu_ions': -11.218158294976394}
[INFO 12-05 18:20:39] optimpv.axBOtorchOptimizer: Trial 50 completed with results: {'Hyst1_JV_nrmse_linear': np.float64(0.0038468781586669955), 'Hyst2_JV_nrmse_linear': np.float64(0.009926511591275375), 'Hyst3_JV_nrmse_linear': np.float64(0.005698212531098894), 'Hyst4_JV_nrmse_linear': np.float64(0.009072514111929025)} and parameters: {'l2.mu_n': -3.0922545673672177, 'l2.mu_p': -3.0, 'l2.N_t_bulk': 2.7614667608574607e+20, 'l1.N_t_int': 462074194783.0188, 'l2.N_t_int': 10000000000000.0, 'l2.N_ions': 1e+22, 'l2.mu_ions': -11.0}
[7]:
# get the best parameters and update the params list in the optimizer and the agent
ax_client = optimizer.ax_client # get the ax client
optimizer.update_params_with_best_balance() # update the params list in the optimizer with the best parameters
hyst1.params = optimizer.params # update the params list in the agent with the best parameters
hyst2.params = optimizer.params # update the params list in the agent with the best parameters
hyst3.params = optimizer.params # update the params list in the agent with the best parameters
hyst4.params = optimizer.params # update the params list in the agent with the best parameters

# print the best parameters
print('Best parameters:')
for p,po in zip(optimizer.params, params_orig):
    print(p.name, 'fitted value:', p.value, 'original value:', po.value)

print('\nSimSS command line:')
print(hyst1.get_SIMsalabim_clean_cmd(hyst1.params,sim_type='zimt')) # print the simss command line with the best parameters

Best parameters:
l2.mu_n fitted value: 0.00080862177604897 original value: 0.0006
l2.mu_p fitted value: 0.001 original value: 0.0004
l2.N_t_bulk fitted value: 2.7614667608574607e+20 original value: 1e+20
l1.N_t_int fitted value: 462074194783.0188 original value: 500000000000.0
l2.N_t_int fitted value: 10000000000000.0 original value: 4000000000000.0
l2.N_ions fitted value: 1e+22 original value: 1e+22
l2.mu_ions fitted value: 1e-11 original value: 5.7e-12
R_series fitted value: 0.0 original value: 0.0

SimSS command line:
./zimt -l2.mu_n 0.00080862177604897 -l2.mu_p 0.001 -l2.N_t_bulk 2.7614667608574607e+20 -l1.N_t_int 462074194783.0188 -l2.N_t_int 10000000000000.0 -l2.N_anion 1e+22 -l2.N_cation 1e+22 -l2.mu_anion 1e-11 -l2.mu_cation 1e-11 -R_series 0.0
[8]:
# Plot optimization results
data = ax_client.summarize()
all_metrics = optimizer.all_metrics
plt.figure()
plt.plot(np.minimum.accumulate(data[all_metrics]), label="Best value seen so far")
plt.yscale("log")
plt.xlabel("Iteration")
plt.ylabel("Target metric: " + metric + " with " + loss + " loss")
plt.legend()
plt.title("Best value seen so far")

plt.show()
../_images/examples_MO_hysteresis_fakePerovskite_11_0.png
[9]:
import matplotlib
# import itertools
from itertools import combinations
comb = list(combinations(optimizer.all_metrics, 2))
threshold_list = []
for i in range(len(optimizer.agents)):
    for j in range(len(optimizer.agents[i].threshold)):
        threshold_list.append(optimizer.agents[i].threshold[j])
threshold_comb = list(combinations(threshold_list, 2))
pareto = ax_client.get_pareto_frontier(use_model_predictions=False)
print('Pareto frontier:', pareto)
cm = matplotlib.colormaps.get_cmap('viridis')
df = get_df_from_ax(params, optimizer)
# create pareto df
dum_dic = {}
for eto in pareto:
    print(eto[1])
    for metr in optimizer.all_metrics:
        if metr not in dum_dic.keys():
            dum_dic[metr] = []
        dum_dic[metr].append(eto[1][metr][0])
df_pareto = pd.DataFrame(dum_dic)

for c,t_c in zip(comb,threshold_comb):
    plt.figure(figsize=(10, 10))
    plt.scatter(df[c[0]],df[c[1]],c=df.index, cmap=cm, marker='o', s=100) # plot the points with color according to the iteration
    cbar = plt.colorbar()
    cbar.set_label('Iteration')
    sorted_df = df_pareto.sort_values(by=c[0])
    plt.plot(sorted_df[c[0]],sorted_df[c[1]],'r')
    plt.scatter(t_c[0],t_c[1],c='r', marker='x', s=100) # plot the threshold
    plt.xlabel(c[0])
    plt.ylabel(c[1])
    plt.xscale('log')
    plt.yscale('log')


    plt.show()

Pareto frontier: [({'l2.mu_n': -3.0922545673672177, 'l2.mu_p': -3.0, 'l2.N_t_bulk': 2.7614667608574607e+20, 'l1.N_t_int': 462074194783.0188, 'l2.N_t_int': 10000000000000.0, 'l2.N_ions': 1e+22, 'l2.mu_ions': -11.0}, {'Hyst1_JV_nrmse_linear': (np.float64(0.0038468781586669955), nan), 'Hyst2_JV_nrmse_linear': (np.float64(0.009926511591275375), nan), 'Hyst3_JV_nrmse_linear': (np.float64(0.005698212531098894), nan), 'Hyst4_JV_nrmse_linear': (np.float64(0.009072514111929025), nan)}, 50, '50_0'), ({'l2.mu_n': -3.542331809151619, 'l2.mu_p': -3.0, 'l2.N_t_bulk': 1e+21, 'l1.N_t_int': 392725762873.45886, 'l2.N_t_int': 10000000000000.0, 'l2.N_ions': 1e+22, 'l2.mu_ions': -11.28706933612387}, {'Hyst1_JV_nrmse_linear': (np.float64(0.00968946683624645), nan), 'Hyst2_JV_nrmse_linear': (np.float64(0.014940445806584142), nan), 'Hyst3_JV_nrmse_linear': (np.float64(0.018276020500573947), nan), 'Hyst4_JV_nrmse_linear': (np.float64(0.006818382137226131), nan)}, 43, '43_0'), ({'l2.mu_n': -3.812747064457514, 'l2.mu_p': -3.010156370148947, 'l2.N_t_bulk': 8.493763795762347e+20, 'l1.N_t_int': 419964887602.55005, 'l2.N_t_int': 9633104652559.713, 'l2.N_ions': 9.846852247745236e+21, 'l2.mu_ions': -11.42522080351527}, {'Hyst1_JV_nrmse_linear': (np.float64(0.009744742580411017), nan), 'Hyst2_JV_nrmse_linear': (np.float64(0.020324265500232683), nan), 'Hyst3_JV_nrmse_linear': (np.float64(0.021101626200911296), nan), 'Hyst4_JV_nrmse_linear': (np.float64(0.006395232608971956), nan)}, 46, '46_0')]
{'Hyst1_JV_nrmse_linear': (np.float64(0.0038468781586669955), nan), 'Hyst2_JV_nrmse_linear': (np.float64(0.009926511591275375), nan), 'Hyst3_JV_nrmse_linear': (np.float64(0.005698212531098894), nan), 'Hyst4_JV_nrmse_linear': (np.float64(0.009072514111929025), nan)}
{'Hyst1_JV_nrmse_linear': (np.float64(0.00968946683624645), nan), 'Hyst2_JV_nrmse_linear': (np.float64(0.014940445806584142), nan), 'Hyst3_JV_nrmse_linear': (np.float64(0.018276020500573947), nan), 'Hyst4_JV_nrmse_linear': (np.float64(0.006818382137226131), nan)}
{'Hyst1_JV_nrmse_linear': (np.float64(0.009744742580411017), nan), 'Hyst2_JV_nrmse_linear': (np.float64(0.020324265500232683), nan), 'Hyst3_JV_nrmse_linear': (np.float64(0.021101626200911296), nan), 'Hyst4_JV_nrmse_linear': (np.float64(0.006395232608971956), nan)}
../_images/examples_MO_hysteresis_fakePerovskite_12_1.png
../_images/examples_MO_hysteresis_fakePerovskite_12_2.png
../_images/examples_MO_hysteresis_fakePerovskite_12_3.png
../_images/examples_MO_hysteresis_fakePerovskite_12_4.png
../_images/examples_MO_hysteresis_fakePerovskite_12_5.png
../_images/examples_MO_hysteresis_fakePerovskite_12_6.png
[11]:
# Plot the density of the exploration of the parameters
# this gives a nice visualization of where the optimizer focused its exploration and may show some correlation between the parameters
plot_dens = True
if plot_dens:
    from optimpv.posterior.exploration_density import *
    params_orig_dict, best_parameters = {}, {}
    for p in params_orig:
        params_orig_dict[p.name] = p.value
    for p in optimizer.params:
        best_parameters[p.name] = p.value

    fig_dens, ax_dens = plot_density_exploration(params, optimizer = optimizer, best_parameters = best_parameters, params_orig = params_orig_dict, optimizer_type = 'ax')

../_images/examples_MO_hysteresis_fakePerovskite_13_0.png
[12]:
# rerun the simulation with the best parameters
def run_hyst(idx):
    if idx == 0:
        yfit = hyst1.run(parameters={})
        return yfit
    elif idx == 1:
        yfit = hyst2.run(parameters={})
        return yfit
    elif idx == 2:
        yfit = hyst3.run(parameters={})
        return yfit
    elif idx == 3:
        yfit = hyst4.run(parameters={})
        return yfit
# Run the simulations in parallel
results = joblib.Parallel(n_jobs=-1)(
    joblib.delayed(run_hyst)(i) for i in range(4)
)
# Extract results hyst.run returns only yfit
yfit1 = results[0]
yfit2 = results[1]
yfit3 = results[2]
yfit4 = results[3]
# Plot the results
plt.figure(figsize=(10, 10))
viridis = plt.get_cmap('viridis', 4)
plt.plot(X1, y1, label=f'Scan Speed = 0.1',c=viridis(0),linewidth=2,alpha=0.5)
plt.plot(X2, y2, label=f'Scan Speed = 1',c=viridis(1),linewidth=2,alpha=0.5)
plt.plot(X3, y3, label=f'Scan Speed = 10',c=viridis(2),linewidth=2,alpha=0.5)
plt.plot(X4, y4, label=f'Scan Speed = 100',c=viridis(3),linewidth=2,alpha=0.5)
plt.plot(X1, yfit1, label=f'Fit Scan Speed = 0.1',c=viridis(0),linewidth=2,linestyle='--')
plt.plot(X2, yfit2, label=f'Fit Scan Speed = 1',c=viridis(1),linewidth=2,linestyle='--')
plt.plot(X3, yfit3, label=f'Fit Scan Speed = 10',c=viridis(2),linewidth=2,linestyle='--')
plt.plot(X4, yfit4, label=f'Fit Scan Speed = 100',c=viridis(3),linewidth=2,linestyle='--')
plt.xlabel('Applied Voltage [V]')
plt.ylabel('Current Density [A/m$^2$]')
plt.legend()
plt.show()


../_images/examples_MO_hysteresis_fakePerovskite_14_0.png
[13]:
# Clean up the output files (comment out if you want to keep the output files)
sim.clean_all_output(session_path_zimt)
sim.delete_folders('tmp',session_path_zimt)
# uncomment the following lines to delete specific files
sim.clean_up_output('PTAA',session_path_zimt)
sim.clean_up_output('fakePerovskite',session_path_zimt)
sim.clean_up_output('C60',session_path_zimt)
sim.clean_up_output('simulation_setup_zimt_fakePerovskite',session_path_zimt)
sim.clean_up_output('freqZ',session_path_zimt)
# same for the input files
for file in optical_files:
    sim.clean_up_output(file,session_path_zimt)