Dip  0.92.4
vrp_cp.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 /* (c) Copyright 2000-2013 Ted Ralphs. All Rights Reserved. */
8 /* */
9 /* This application was developed by Ted Ralphs (ted@lehigh.edu) */
10 /* */
11 /* This software is licensed under the Eclipse Public License. Please see */
12 /* accompanying file for terms. */
13 /* */
14 /*===========================================================================*/
15 
16 #ifndef _VRP_CP_H
17 #define _VRP_CP_H
18 
19 /* SYMPHONY include files */
20 #include "sym_proto.h"
21 
22 typedef struct VRP_CP_PROBLEM{
23  int vertnum; /*number of vertices in the problem*/
24  int edgenum; /*number of edges in the problem*/
25  int *edges; /*a list of the edges (by index pairs)*/
26  struct POOL_NET *n;
28 
29 /*--------------------------------------------------------------------------*
30  * The next three data structuires are used in the construction of the
31  * solution graph which we use to check the violation of certain cuts
32  *--------------------------------------------------------------------------*/
33 
34 typedef struct POOL_NET{
35  struct POOL_NODE *verts;
36  struct POOL_EDGE *adjlist;
37  int vertnum;
38  int edgenum;
39 }pool_net;
40 
41 typedef struct POOL_NODE{
42  struct POOL_EDGE *first;
43 }pool_node;
44 
45 typedef struct POOL_EDGE{
46  struct POOL_EDGE *next;
47  int other_end;
48  double weight;
49 }pool_edge;
50 
51 pool_net *create_pool_net PROTO((vrp_cp_problem *vcp, int varnum, int *indices,
52  double *values));
53 void free_pool_net PROTO((vrp_cp_problem *vcp));
54 
55 
56 #endif
int edgenum
Definition: cnrp_cp.h:45
struct POOL_EDGE pool_edge
double weight
Definition: cnrp_cp.h:55
#define PROTO(x)
Definition: sym_proto.h:27
struct POOL_NODE * verts
Definition: cnrp_cp.h:42
struct POOL_EDGE * next
Definition: cnrp_cp.h:53
struct POOL_NET pool_net
struct POOL_NODE pool_node
int vertnum
Definition: vrp_cp.h:23
struct VRP_CP_PROBLEM vrp_cp_problem
struct POOL_NET * n
Definition: vrp_cp.h:26
int other_end
Definition: cnrp_cp.h:54
struct POOL_EDGE * first
Definition: cnrp_cp.h:49
int * edges
Definition: vrp_cp.h:25
int edgenum
Definition: vrp_cp.h:24
struct POOL_EDGE * adjlist
Definition: cnrp_cp.h:43
int vertnum
Definition: cnrp_cp.h:44