00001 /*===========================================================================*/ 00002 /* */ 00003 /* This file is part of a demonstration application for use with the */ 00004 /* SYMPHONY Branch, Cut, and Price Library. This application is a solver for */ 00005 /* the Vehicle Routing Problem and the Traveling Salesman Problem. */ 00006 /* */ 00007 /* (c) Copyright 2000-2008 Ted Ralphs. All Rights Reserved. */ 00008 /* */ 00009 /* This application was developed by Ted Ralphs (tkralphs@lehigh.edu) */ 00010 /* */ 00011 /* This software is licensed under the Common Public License. Please see */ 00012 /* accompanying file for terms. */ 00013 /* */ 00014 /*===========================================================================*/ 00015 00016 #ifndef _VRP_CP_H 00017 #define _VRP_CP_H 00018 00019 /* SYMPHONY include files */ 00020 #include "sym_proto.h" 00021 00022 typedef struct VRP_CP_PROBLEM{ 00023 int vertnum; /*number of vertices in the problem*/ 00024 int edgenum; /*number of edges in the problem*/ 00025 int *edges; /*a list of the edges (by index pairs)*/ 00026 struct POOL_NET *n; 00027 }vrp_cp_problem; 00028 00029 /*--------------------------------------------------------------------------* 00030 * The next three data structuires are used in the construction of the 00031 * solution graph which we use to check the violation of certain cuts 00032 *--------------------------------------------------------------------------*/ 00033 00034 typedef struct POOL_NET{ 00035 struct POOL_NODE *verts; 00036 struct POOL_EDGE *adjlist; 00037 int vertnum; 00038 int edgenum; 00039 }pool_net; 00040 00041 typedef struct POOL_NODE{ 00042 struct POOL_EDGE *first; 00043 }pool_node; 00044 00045 typedef struct POOL_EDGE{ 00046 struct POOL_EDGE *next; 00047 int other_end; 00048 double weight; 00049 }pool_edge; 00050 00051 pool_net *create_pool_net PROTO((vrp_cp_problem *vcp, int varnum, int *indices, 00052 double *values)); 00053 void free_pool_net PROTO((vrp_cp_problem *vcp)); 00054 00055 00056 #endif