Module: simulated annealing
From SolutionSpaceTool
This module implements a simulated annealing optimization concept. Its main function can be called either from console or from GUI(recommended). The function saves solution files in standard folder for data.
package | opt |
imported by: |
Functions
return generate_simulated_annealing_data(functions, parameters, file_info, time_check)
functions : dictionary with functions from datastructure
essential keys: - "randomSolution" : returns a random representation - "changeSolution" : returns a function to change the given representation - "costEvaluation" : returns the calculated costs for the given representation
parameters : dictionary with algorithm parameters
essential keys: - "Tstart" : initial temperature of algorithm - "Tend" : temperature to reach with annealing - "Tsteps" : steps between start and end temperature - "Tsamples" : number of generated solutions each step - "correct_factor" : factor to adjust the acceptance probability
file_info : dictionary with information about the file names of the data files
essential keys: - "trial_name" : name of trial given in GUI - "file_name_list" : additional information included in file name (can be empty string)
time_check : boolean
True: estimates runtime with reduced samples False: full calculation with saving data to files
return:
int : esimtated runtime (time_check == True) list : list of created files sorted by given cost criteria (time_check == False)