static DUMP_PARAMETER main_dump_parameters[] = { /* TYPE ADDRESS NAME */ { DUMP_BOOLEAN, VADDR(dump_final_population), "dump_final_population" }, { DUMP_BOOLEAN, VADDR(verbose), "verbose" }, { DUMP_BOOLEAN, VADDR(overwrite), "overwrite" }, { DUMP_BOOLEAN, VADDR(data_only), "data_only" }, { DUMP_BOOLEAN, VADDR(unique), "unique" }, { DUMP_BOOLEAN, VADDR(show_something), "show_something" }, { DUMP_BOOLEAN, VADDR(catch_interrupts), "catch_interrupts" }, { DUMP_BOOLEAN, VADDR(stop_at_max_fitness), "stop_at_max_fitness" }, { DUMP_BOOLEAN, VADDR(max_possible_fitness_found), "max_possible_fitness_found" }, { DUMP_BOOLEAN, VCADDR(elitist), "elitist" }, #if defined(APP_HASHING) { DUMP_BOOLEAN, VCADDR(hashing), "hashing" }, #endif { DUMP_INT, VADDR(show_start), "show_start" }, { DUMP_INT, VADDR(show_stop), "show_stop" }, { DUMP_INT, VADDR(report_interval), "report_interval" }, { DUMP_INT, VADDR(top_ranking), "top_ranking" }, { DUMP_INT, VADDR(time_to_next_mutation), "time_to_next_mutation" }, { DUMP_INT, VCADDR(best_fitness_of_generation), "best_fitness_of_generation" }, { DUMP_INT, VCADDR(best_individual_of_generation), "best_individual_of_generation" }, { DUMP_INT, VCADDR(population_size), "population_size" }, { DUMP_INT, VCADDR(run), "run" }, { DUMP_INT, VCADDR(nruns), "nruns" }, { DUMP_INT, VCADDR(generation), "generation" }, { DUMP_INT, VCADDR(ngenerations), "ngenerations" }, { DUMP_INT, VCADDR(nselections), "nselections" }, #if ! defined(APP_HAS_CONSTANT_POPULATION_SIZE) { DUMP_INT, VCADDR(max_population_size), "max_population_size" }, { DUMP_INT, VADDR(last_population_size), "last_population_size" }, { DUMP_INT, VADDR(last_nselections), "last_nselections" }, #endif #if defined(APP_INDIVIDUALS_HAVE_CONSTANT_SIZE) { DUMP_INT, VCADDR(genome_size), "genome_size" }, #endif { DUMP_LONG, VADDR(seed), "seed" }, { DUMP_LONG, VADDR(total_allocked), "total_allocked" }, #if defined(SCALING) { DUMP_STRING, VADDR(scaling_function_name), "scaling_function_name" }, #endif { DUMP_STRING, VADDR(survivors_function_name), "survivors_function_name" }, { DUMP_STRING, VADDR(selection_function_name), "selection_function_name" }, { DUMP_STRING, VADDR(crossover_function_name), "crossover_function_name" }, { DUMP_STRING, VADDR(mutation_function_name), "mutation_function_name" }, { DUMP_DOUBLE, VCADDR(mutation_prob), "mutation_prob" }, { DUMP_DOUBLE, VCADDR(crossover_prob), "crossover_prob" }, { DUMP_DOUBLE, VCADDR(tournament_prob), "tournament_prob" }, { DUMP_DOUBLE, VCADDR(uniform_prob), "uniform_prob" }, { DUMP_FITNESS, VADDR(max_possible_fitness), "max_possible_fitness" }, { DUMP_FILE, VADDR(output_files[SHOW_AVERAGES]), SHOW_AVERAGES_NAME }, { DUMP_FILE, VADDR(output_files[SHOW_BEST_OF_GENERATION]), SHOW_BEST_OF_GENERATION_NAME }, { DUMP_FILE, VADDR(output_files[SHOW_BEST_OF_RUN]), SHOW_BEST_OF_RUN_NAME }, { DUMP_FILE, VADDR(output_files[SHOW_HASHING]), SHOW_HASHING_NAME }, { DUMP_FILE, VADDR(output_files[SHOW_HASHING_VERBOSE]), SHOW_HASHING_VERBOSE_NAME }, { DUMP_FILE, VADDR(output_files[SHOW_INTERMEDIATES]), SHOW_INTERMEDIATES_NAME }, { DUMP_FILE, VADDR(output_files[SHOW_FINAL]), SHOW_FINAL_NAME }, { DUMP_FILE, VADDR(output_files[SHOW_POPULATIONS]), SHOW_POPULATIONS_NAME }, { DUMP_FILE, VADDR(output_files[SHOW_POPULATIONS_SORTED_BY_G]), SHOW_POPULATIONS_SORTED_BY_G_NAME }, { DUMP_FILE, VADDR(output_files[SHOW_POPULATIONS_SORTED_BY_F]), SHOW_POPULATIONS_SORTED_BY_F_NAME }, { DUMP_FILE, VADDR(output_files[SHOW_TOTALS]), SHOW_TOTALS_NAME }, { DUMP_FILE, VADDR(output_files[APP_OUTPUT]), APP_OUTPUT_NAME }, { DUMP_FILE, VADDR(output_files[MAIN_OUTPUT]), MAIN_OUTPUT_NAME }, { DUMP_FILE, VADDR(output_files[DUMP_FINAL]), DUMP_FINAL_NAME }, { DUMP_HEADER, (VOID *) 0, "Random number generator state :" }, { DUMP_DUMP_FUNCTION, (VOID *)dump_random_state, (STRING) 0 }, { DUMP_RESTORE_FUNCTION, (VOID *)restore_random_state, (STRING) 0 }, #if defined(APP_WANTS_TO_DUMP) { DUMP_HEADER, (VOID *) 0, "Application state dump begins :" }, { DUMP_DUMP_FUNCTION, (VOID *)app_dump_state, (STRING) 0 }, { DUMP_RESTORE_FUNCTION, (VOID *)app_restore_state, (STRING) 0 }, { DUMP_HEADER, (VOID *) 0, "End of application state dump." }, #endif /* * Allocate memory if we are restoring. So we can read the population, * the best individual and the alleles. */ { DUMP_RESTORE_FUNCTION, (VOID *)allocate_memory, (STRING) 0 }, { DUMP_HEADER, (VOID *) 0, "Population :" }, { DUMP_POPULATION, (VOID *) 0, (STRING) 0 }, { DUMP_RESTORE_FUNCTION, (VOID *)read_population, (STRING) 0 }, };