CADETProcess.fractionation.FractionationOptimizer.evaluate

CADETProcess.fractionation.FractionationOptimizer.evaluate#

FractionationOptimizer.evaluate(simulation_results: SimulationResults, purity_required: float | list[float], components: list[str] | None = None, use_total_concentration_components: bool = True, ranking: str | list[float] | int = 'equal', obj_fun: Callable | None = None, n_objectives: int = 1, bad_metrics: float | list[float] = 0, minimize: bool = True, allow_empty_fractions: bool = True, scale_trust_radius: bool = False, ignore_failed: bool = False, return_optimization_results: bool = False, save_results: bool = False) Fractionator | tuple[Fractionator, OptimizationResults]#

Optimize the fractionation times with respect to purity constraints.

Parameters:
simulation_resultsSimulationResults

Results containing the chromatograms for fractionation.

purity_requiredfloat or array_like

Minimum required purity for components. If is float, the same value is assumed for all components.

componentslist

List of components to consider in the fractionation process.

use_total_concentration_componentsbool, Default=True

Flag wheter to use the total concentration components.

rankingstr | list[float] | int, optional, default=”equal”

Weighting factors for individual components. If integer, only component of that index is used. If None, the same value is assumed for all components. The default is None.

obj_funfunction, optional

Objective function used for OptimizationProblem. If COBYLA is used, must return single objective. If is None, the mass of all components is maximized.

n_objectivesint, optional

Number of objectives returned by obj_fun. The default is 1.

bad_metricsfloat or list of floats, optional

Values to be returned if evaluation of objective function failes. The default is 0.

minimizebool, optional

If True, the obj_fun is assumed to return a value that is to be minimized. The default it True.

allow_empty_fractions: bool, optional

If True, allow empty fractions. The default is True.

scale_trust_radius: bool, optional

If True, scale initial trust radius depending on linear constraints and initial values. The default is False.

ignore_failedbool, optional

Ignore failed optimization and use initial values. The default is False.

return_optimization_resultsbool, optional

If True, return optimization results. Otherwise, return fractionation object. The default is False.

save_resultsbool, optional

If True, save optimization results. The default is False.

Returns:
Fractionator or OptimizationResults

The Fractionator object with optimized cut times or the OptimizationResults object.

Raises:
TypeError

If simulation_results is not an instance of SimulationResults.

CADETProcessError

If simulation_results do not contain chromatograms.

Warning

If purity requirements cannot be fulfilled.