pymead.optimization.opt_setup.calculate_warm_start_index#

calculate_warm_start_index(warm_start_generation: int, warm_start_directory: str)[source]#

Calculates the generation from which to restart the optimization. If the specified warm start generation is not found in the algorithm_gen_xxx.pkl files, an error is raised.

Parameters:
  • warm_start_generation (int) – Generation from which to restart the optimization. If this value is -1, the optimization will start from the most recent point.

  • warm_start_directory (str) – Path to the optimization directory containing the algorithm_gen_xxx.pkl files

Returns:

The index of the generation to start from.

Return type:

int