differential_evolution

despasito.parameter_fitting.global_methods.differential_evolution

differential_evolution(parameters_guess, bounds, fit_bead, fit_parameter_names, exp_dict, global_opts={}, constraints=None)[source]

Fit defined parameters for equation of state object using scipy.optimize.differential_evolution with given experimental data.

Parameters:
  • parameters_guess (numpy.ndarray) – An array of initial guesses for parameters. Not used in this method.

  • bounds (list[tuple]) – List of length equal to fit_parameter_names with lists of pairs for minimum and maximum bounds of parameter being fit. Defaults from Eos object are broad, so we recommend specification.

  • fit_bead (str) – Name of bead whose parameters are being fit.

  • fit_parameter_names (list[str]) – This list contains the name of the parameter being fit (e.g. epsilon). See EOS documentation for supported parameter names. Cross interaction parameter names should be composed of parameter name and the other bead type, separated by an underscore (e.g. epsilon_CO2).

  • exp_dict (dict) – Dictionary of experimental data objects.

  • global_opts (dict, Optional) –

    • init (str) - Optional, default=”random”, type of initiation for population

    • write_intermediate_file (str) - Optional, default=False, If True, an

    intermediate file will be written from the method callback - filename (str) - Optional, default=None, filename for callback output, if provided, write_intermediate_file will be set to True - obj_cut (float) - Optional, default=None, Cut-off objective value to write the parameters, if provided, write_intermediate_file will be set to True - etc. Other keywords for scipy.optimize.differential_evolution use the function defaults

  • constraints (dict, Optional, default=None) – This dictionary of constraint types and their arguments will be converted into a tuple of constraint classes that is compatible

Returns:

Objective – scipy OptimizedResult object

Return type:

obj