Root/Examples/ehw4/src/sintesishw_client.h

1
2/** Genetic definitions **/
3#define PAR_ONLYFIT 0 //paralelizacion, 0 ALGORITMO ENTERO, 1 SOLO FITNESS
4
5#define RESULTADOS 2
6
7/* Numero de generaciones en el que se amplia la logitud del cromosoma*/
8
9#define ARBOLES 5
10#define LONG_ARBOL 8
11
12#define nivel1 pentarboles * 4
13#define ARBOLES_INDIV (int)(nivel1 + *(nivel2+pentarboles) + *(nivel3+pentarboles) + *(nivel4+pentarboles) + *(nivel5+pentarboles))
14#define LONG_INDIV (int)(ARBOLES_INDIV * LONG_ARBOL)
15
16//sockets defs
17#define PORT 3550 /* El puerto que sera abierto */
18#define BACKLOG 2 /* El numero de conexiones permitidas */
19#define MAXDATASIZE 10000 /* El numero maximo de datos en bytes */
20#define IP0 "192.168.254.101"
21#define IP1 "192.168.0.6"
22#define IP2 "192.168.0.7"
23#define IP3 "192.168.0.8"
24#define IP4 "192.168.0.9"
25#define IP5 "192.168.0.10"
26#define IP6 "192.168.0.11"
27#define IP7 "192.168.0.12"
28
29//#define IP0 "193.147.52.150"
30//#define IP1 "193.147.52.139"
31
32/* Variables globales */
33char *funlut_ap, *puertas_ap;
34void *evalfit_ptr1, *evalfit_ptr4, *evalfit_ptr3, *evalfit_ptr2;
35int maxgeneraciones, poblacion, nodos;
36
37typedef long long timestamp_t;
38static timestamp_t
39        get_timestamp ()
40{
41    struct timeval now;
42    gettimeofday (&now, NULL);
43    return now.tv_usec + (timestamp_t)now.tv_sec *1000000 ;
44}
45
46struct gen_datos_tipo
47{
48    int *objetivo;
49    int tamaobj;
50    int pentarboles;
51    int vars;
52    int tamacrom;
53    int maxgen;
54    char *cromo_sal;
55    int *fitness;
56    char *cromo_entrada;
57    int fitness_entrada;
58    int nivel_max;
59    int en_cromo_entrada;
60    int *generacion;
61    int *tiempo;
62    int aux;
63    int *aux_sal;
64};
65

Archive Download this file

Branches:
master



interactive