Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Optimize Batch Elution Process (Single Objective)

Optimize Batch Elution Process (Single Objective)

Setup Optimization Problem

Setup Simulator

Setup Fractionator

Add callback for post-processing

Setup Objectives

Configure Optimizer

Run Optimization

==========================================================
n_gen  |  n_eval  | n_nds  |      eps      |   indicator  
==========================================================
     1 |        3 |      1 |             - |             -
     2 |        6 |      1 |  0.0008150780 |             f
     3 |        9 |      1 |  0.0018897861 |             f

Optimization Progress and Results

The OptimizationResults which are returned contain information about the progress of the optimization. For example, the attributes x and f contain the final value(s) of parameters and the objective function.

[[465.9217766  136.87256513]]
[[0.00687963]]

After optimization, several figures can be plotted to vizualize the results. For example, the convergence plot shows how the function value changes with the number of evaluations.

(<Figure size 354.331x236.22 with 1 Axes>, array([<Axes: xlabel='$n_{Evaluations}$', ylabel='PerformanceProduct'>], dtype=object))
<Figure size 354.331x236.22 with 1 Axes>
<Figure size 708.661x354.331 with 2 Axes>
<Figure size 354.331x236.22 with 1 Axes>

The plot_objectives method shows the objective function values of all evaluated individuals. Here, lighter color represent later evaluations. Note that by default the values are plotted on a log scale if they span many orders of magnitude. To disable this, set autoscale=False.

(<Figure size 708.661x354.331 with 2 Axes>, array([[<Axes: xlabel='cycle_time', ylabel='PerformanceProduct'>, <Axes: xlabel='feed_duration.time', ylabel='PerformanceProduct'>]], dtype=object))
<Figure size 708.661x354.331 with 2 Axes>

Note that more figures are created for constrained optimization, as well as multi-objective optimization. All figures are also saved automatically in the working_directory. Moreover, results are stored in a .csv file.

  • The results_all.csv file contains information about all evaluated individuals.

  • The results_last.csv file contains information about the last generation of evaluated individuals.

  • The results_pareto.csv file contains only the best individual(s).