Dip  0.92.4
heur_types.h
Go to the documentation of this file.
1 /*===========================================================================*/
2 /* */
3 /* This file is part of a demonstration application for use with the */
4 /* SYMPHONY Branch, Cut, and Price Library. This application is a solver for */
5 /* the Vehicle Routing Problem and the Traveling Salesman Problem. */
6 /* */
7 /* This application was developed by Ted Ralphs (ted@lehigh.edu) */
8 /* This file was modified by Ali Pilatin January, 2005 (alp8@lehigh.edu) */
9 /* */
10 /* (c) Copyright 2000-2005 Ted Ralphs. All Rights Reserved. */
11 /* */
12 /* This software is licensed under the Eclipse Public License. Please see */
13 /* accompanying file for terms. */
14 /* */
15 /*===========================================================================*/
16 
17 #ifndef _HEUR_TYPES_H
18 #define _HEUR_TYPES_H
19 
20 #include "vrp_common_types.h"
21 #include "heur_params.h"
22 
23 typedef struct NEIGHBOR{ /* a neighbor to a set of nodes */
24  int nbor; /* the index of the neighbor */
25  int host; /* the node in the set st. host-nbor edge is the cheapest */
26  int cost; /* the cost of that cheapest edge */
27 }neighbor;
28 
29 typedef struct CLOSENODE{ /*close node to a particular one */
30  int node;
31  int cost;
32 }closenode;
33 
34 /*---------------------------------------------------------------------------*\
35 | Contains the problem data needed by the upper bounding procedures |
36 \*---------------------------------------------------------------------------*/
37 
38 typedef struct HEUR_PROB{
39  best_tours *cur_tour; /*temporary tour storage*/
40  heur_params par; /*problem parameters*/
41  int vertnum; /*the number of nodes in the problem,*\
42  \*including the depot */
43  int numroutes; /*contains the number of routes that the*\
44  | problem is to be solved with. can be |
45  \*prespecified. */
46  int depot;
47  int capacity; /*the capacity of a truck*/
48  int *demand; /*an array containing the demands for *\
49  | each node. node i's demand is |
50  \*p->demand[i-1] */
51  int edgenum; /*number of edges in the problem*/
52  distances dist; /*contains the information for computing the costs*/
53 }heur_prob;
54 
55 #endif
56 
57 
58 
struct NEIGHBOR neighbor
int edgenum
Definition: heur_types.h:51
struct HEUR_PROB heur_prob
heur_params par
Definition: heur_types.h:40
int node
Definition: cnrp_types.h:45
distances dist
Definition: heur_types.h:52
best_tours * cur_tour
Definition: heur_types.h:39
int * demand
Definition: heur_types.h:48
int host
Definition: heur_types.h:25
int numroutes
Definition: heur_types.h:43
struct CLOSENODE closenode
int capacity
Definition: heur_types.h:47
int vertnum
Definition: heur_types.h:41
int cost
Definition: heur_types.h:26
int cost
Definition: cnrp_types.h:46
int depot
Definition: heur_types.h:46
int nbor
Definition: heur_types.h:24