Ejemplo n.º 1
0
 def __init__(self,
              solver_file_path,
              cnf_file_path,
              reports_folder_path,
              threads_number,
              handled_parameters_indexes,
              # количество = количеству обрабатываемых активных параметров (лишних значений нет)
              start_parameters_values,
              max_delta,
              max_hamming_distance,
              min_hamming_distance=1):
     self.__solver_name = FileModule.get_file_name(solver_file_path)
     self.__solver_file_path = solver_file_path
     self.__cnf_file_path = cnf_file_path
     self.__reports_folder_path = reports_folder_path
     self.__handled_parameters_indexes = handled_parameters_indexes
     # start_parameters_values это массив, элементы которого могут быть:
     # bool значением для параметра типа BOOL
     # кортежем из 2-х double для параметра типа RANGE
     self.__start_parameters_values = start_parameters_values
     self.__last_parameters_values_tuple = list()
     self.__parameters_templates = SolversDescriptions.get_handled_parameters_template(self.__solver_name,
                                                                                       threads_number,
                                                                                       handled_parameters_indexes)
     parameters_classes = self.__create_parameters_classes()
     self.__max_delta = max_delta
     self.__values_factory = ParametersValuesFactory(parameters_classes,
                                                     max_delta,
                                                     max_hamming_distance,
                                                     min_hamming_distance)
Ejemplo n.º 2
0
 def __init__(self,
              solver_file_path,
              cnf_file_path,
              reports_folder_path,
              threads_number,
              handled_parameters_indexes,
              start_parameters_values,
              max_delta):
     self.__solver_name = FileModule.get_file_name(solver_file_path)
     self.__solver_file_path = solver_file_path
     self.__cnf_file_path = cnf_file_path
     self.__reports_folder_path = reports_folder_path
     self.__handled_parameters_indexes = handled_parameters_indexes
     self.__start_parameters_values = start_parameters_values
     self.__max_delta = max_delta
     self.__last_parameters_values_tuple = list()
     self.__parameters_templates = SolversDescriptions.get_handled_parameters_template(self.__solver_name,
                                                                                       threads_number,
                                                                                       handled_parameters_indexes)
     parameters_classes = self.__create_parameters_classes()
     self.__values_factory = RandomParametersValuesFactory(parameters_classes)
     self.__stop = False
Ejemplo n.º 3
0
 def __init__(
     self,
     solver_file_path,
     reports_folder_path,
     threads_number,
     handled_parameters_indexes,
     # количество = количеству обрабатываемых активных параметров (лишних значений нет)
     start_parameters_values,
 ):
     self.__solver_name = FileModule.get_file_name(solver_file_path)
     self.__solver_file_path = solver_file_path
     self.__next_cnf_index = 0
     self.__current_cnf = ""
     self.__cnf_files_paths = FileModule.get_cnf_file_path()
     self.__reports_folder_path = reports_folder_path
     self.__handled_parameters_indexes = handled_parameters_indexes
     # start_parameters_values это массив, элементы которого могут быть:
     # bool значением для параметра типа BOOL
     # double значением для параметра типа RANGE
     self.__start_parameters_values = start_parameters_values
     self.__parameters_templates = SolversDescriptions.get_handled_parameters_template(
         self.__solver_name, threads_number, handled_parameters_indexes
     )