params.c File Reference

Tunable parameters for the genetic algorithm. More...

#include <stdio.h>
#include <string.h>
#include <error.h>
#include "main.h"
#include "gettext.h"

Functions

int par_get (char *i)
 Parses a string and sets genetic parameters.
void par_print ()

Variables

int par_popsize = 500
 Population size.
int par_toursize = 3
 Tournament size.
int par_mutatepart = 4
 Part of the population that mutates per generation.
int par_randpart = 6
 Part of the population that is randomized per generation.
int par_maxequal = 20
 Maximum number of timetables with equal fitness values that will be tolerated in a generation.
int par_finish = 300
 How many generations must pass without improvement to finish processing.
int par_migrtime = 40
 How many generations must pass between two migrations between neighboring nodes.
int par_migrpart = 10
 Part of the population that will migrate to the next node.
int par_localtresh = 100
 How many generations must pass without improvement to begin local searching.
int par_localstep = 4
 Initial step for local search algorithm.
int par_pophint = 25
 Percent of hinted timetables in the population.
int par_cachesize = 16
 Size of fitness cache.
struct {
   char *   name
   int *   value
par_lookup []
 Map of parameter names to variables.


Detailed Description

Tunable parameters for the genetic algorithm.


Function Documentation

int par_get ( char *  i  ) 

Parses a string and sets genetic parameters.

Returns:
0 if successful or -1 in case of a syntax error.

void par_print (  ) 

brief Prints a debug message with values of genetic parameters.


Variable Documentation

int par_cachesize = 16

Size of fitness cache.

This is the maximum number of timetable fitness values that will be held in the fitness cache.

Larger values mean more cache search overhead but may improve cache hit/miss ratio. It is probably unwise to use caches larger than 32.

In general fitness caching will reduce performance at the start of the genetic algorithm and improve it at the end.

Set to 0 to turn off caching.

int par_localstep = 4

Initial step for local search algorithm.

Larger values mean more exhaustive and slower local search.

const { ... } par_lookup[] [static]

Map of parameter names to variables.

Array must be terminated with an element containing NULL in both fields

int par_migrpart = 10

Part of the population that will migrate to the next node.

For example: 10 means that 1/10 of the population will migrate.

int par_mutatepart = 4

Part of the population that mutates per generation.

For example: 4 means that 1/4 of the population will mutate.

int par_pophint = 25

Percent of hinted timetables in the population.

If the user has loaded an XML file that already contains a partial or a full solution, then some timetables in the population can be initialized with this solution.

This parameter defines the percentage of the timetables in the population that will be initialized (other timetables will be initialized with random values).

Values must be between 0 and 100. Larger values mean that the solution given in the XML file will have a greater possibility of being included in the final solution. If there is no solution in the XML file then this parameter has no effect.

int par_popsize = 500

Population size.

Number of timetables in the population of one node. Higher numbers mean faster population convergence and more CPU time required per generation per node.

int par_randpart = 6

Part of the population that is randomized per generation.

For example: 4 means that 1/4 of the population will mutate.

int par_toursize = 3

Tournament size.

Size of the tournament when choosing mates. Higher numbers mean that timetables with lower fitness values have less chance of producing offspring.


Generated on Tue Jul 3 13:23:36 2007 for Tablix by  doxygen 1.5.2