run_algorithm.run_one_instance#

run_algorithm.run_one_instance(ALGORITHM_PARAMETERS: dict[str, Any]) None#

Runs the SM-SPSA algorithm on one instance.

Includes additional code for checking and saving input parameters, applying heuristics, setting additional required variables, plotting and saving results.

Parameters:

ALGORITHM_PARAMETERS (dict[str, Any]) – The algorithm parameters. The parameters SAVE_OUTPUT, MATRICES_DIRECTORY, M_FILE_NAME, C_FILE_NAME, OUTPUT_DIRECTORY, INSTANCE_NAME, HEURISTIC_TYPE NR_ITERATIONS_TYPE, NR_ITERATIONS_FIXED, CRN_GENERATOR, CENTRED_MASS_START, SEED_VALUE, MEMORY_OPTIMISED and RUNNING_TIME_FILE_NAME are at least necessary. See main.py for parameter explanations. Note that methods that are called within this method may require more parameters.

Raises:

Exception

  1. If NR_ITERATIONS_TYPE="fixed". 2. If an invalid value for CRN_GENERATOR is specified (not “RandomState” or “Generator”).