1997-02-19 13:59:07 +01:00
|
|
|
/*-------------------------------------------------------------------------
|
|
|
|
*
|
|
|
|
* geqo.h--
|
1997-09-07 07:04:48 +02:00
|
|
|
* prototypes for various files in optimizer/geqo
|
1997-02-19 13:59:07 +01:00
|
|
|
*
|
|
|
|
* Copyright (c) 1994, Regents of the University of California
|
|
|
|
*
|
1997-09-08 04:41:22 +02:00
|
|
|
* $Id: geqo.h,v 1.5 1997/09/08 02:37:42 momjian Exp $
|
1997-02-19 13:59:07 +01:00
|
|
|
*
|
|
|
|
*-------------------------------------------------------------------------
|
|
|
|
*/
|
|
|
|
|
|
|
|
/* contributed by:
|
|
|
|
=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=
|
1997-09-07 07:04:48 +02:00
|
|
|
* Martin Utesch * Institute of Automatic Control *
|
|
|
|
= = University of Mining and Technology =
|
|
|
|
* utesch@aut.tu-freiberg.de * Freiberg, Germany *
|
1997-02-19 13:59:07 +01:00
|
|
|
=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=
|
|
|
|
*/
|
|
|
|
|
1997-09-07 07:04:48 +02:00
|
|
|
#ifndef GEQO_H
|
|
|
|
#define GEQO_H
|
1997-02-19 13:59:07 +01:00
|
|
|
|
|
|
|
|
|
|
|
/* GEQO debug flag */
|
|
|
|
/*
|
|
|
|
#define GEQO_DEBUG
|
|
|
|
*/
|
|
|
|
|
|
|
|
/* recombination mechanism */
|
|
|
|
/*
|
|
|
|
#define ERX
|
|
|
|
#define PMX
|
|
|
|
#define CX
|
|
|
|
#define PX
|
|
|
|
#define OX1
|
|
|
|
#define OX2
|
|
|
|
*/
|
|
|
|
#define ERX
|
|
|
|
|
|
|
|
/* genetic algorithm parameters */
|
|
|
|
|
1997-09-07 07:04:48 +02:00
|
|
|
#define GEQO_FILE "pg_geqo" /* Name of the ga config file */
|
1997-02-19 13:59:07 +01:00
|
|
|
|
1997-09-07 07:04:48 +02:00
|
|
|
#define MIN_POOL 128 /* minimum number of individuals */
|
|
|
|
#define MAX_POOL 1024 /* maximum number of individuals */
|
1997-02-19 13:59:07 +01:00
|
|
|
|
1997-09-07 07:04:48 +02:00
|
|
|
#define LOW_EFFORT 1 /* optimization effort values */
|
|
|
|
#define MEDIUM_EFFORT 40 /* are multipliers for computed */
|
|
|
|
#define HIGH_EFFORT 80 /* number of generations */
|
1997-02-19 13:59:07 +01:00
|
|
|
|
1997-09-07 07:04:48 +02:00
|
|
|
#define SELECTION_BIAS 2.0 /* selective pressure within population */
|
|
|
|
/* should be 1.5 <= SELECTION_BIAS <= 2.0 */
|
1997-02-19 13:59:07 +01:00
|
|
|
|
1997-09-08 04:41:22 +02:00
|
|
|
int PoolSize;
|
|
|
|
int Generations;
|
1997-02-19 13:59:07 +01:00
|
|
|
|
1997-09-08 04:41:22 +02:00
|
|
|
long RandomSeed; /* defaults to (long) time(NULL) in
|
1997-09-07 07:04:48 +02:00
|
|
|
* geqo_params.c */
|
1997-09-08 04:41:22 +02:00
|
|
|
double SelectionBias;
|
1997-02-19 13:59:07 +01:00
|
|
|
|
|
|
|
/* logarithmic base for rel->size decrease in case of long
|
|
|
|
queries that cause an integer overflow; used in geqo_eval.c */
|
|
|
|
|
1997-09-07 07:04:48 +02:00
|
|
|
#define GEQO_LOG_BASE 1.5 /* should be 1.0 < GEQO_LOG_BASE <= 2.0 */
|
|
|
|
/* ^^^ */
|
1997-02-19 13:59:07 +01:00
|
|
|
|
|
|
|
/* geqo prototypes */
|
1997-09-08 04:41:22 +02:00
|
|
|
extern Rel *geqo(Query * root);
|
1997-02-19 13:59:07 +01:00
|
|
|
|
1997-09-08 04:41:22 +02:00
|
|
|
extern void geqo_params(int string_length);
|
1997-02-19 13:59:07 +01:00
|
|
|
|
1997-09-08 04:41:22 +02:00
|
|
|
extern Cost geqo_eval(Query * root, Gene * tour, int num_gene);
|
|
|
|
double geqo_log(double x, double b);
|
|
|
|
extern Rel *gimme_tree(Query * root, Gene * tour, int rel_count, int num_gene, Rel * outer_rel);
|
1997-02-19 13:59:07 +01:00
|
|
|
|
|
|
|
|
1997-09-07 07:04:48 +02:00
|
|
|
#endif /* GEQO_H */
|