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 /* Capacitated Network Routing Problems. */ 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 _CUT_POOL_USER_H 00017 #define _CUT_POOL_USER_H 00018 00019 /* SYMPHONY include files */ 00020 #include "sym_proto.h" 00021 00022 /* CNRP include files */ 00023 #include "cnrp_cp_params.h" 00024 00025 00026 typedef struct CNRP_SPEC_CP{ 00027 cnrp_cp_params par; 00028 int vertnum; /*number of vertices in the problem*/ 00029 int edgenum; /*number of edges in the problem*/ 00030 double capacity; 00031 double *demand; 00032 int *edges; /*a list of the edges (by index pairs)*/ 00033 struct POOL_NET *n; 00034 }cnrp_spec_cp; 00035 00036 /*--------------------------------------------------------------------------* 00037 * The next three data structuires are used in the construction of the 00038 * solution graph which we use to check the violation of certain cuts 00039 *--------------------------------------------------------------------------*/ 00040 00041 typedef struct POOL_NET{ 00042 struct POOL_NODE *verts; 00043 struct POOL_EDGE *adjlist; 00044 int vertnum; 00045 int edgenum; 00046 }pool_net; 00047 00048 typedef struct POOL_NODE{ 00049 struct POOL_EDGE *first; 00050 }pool_node; 00051 00052 typedef struct POOL_EDGE{ 00053 struct POOL_EDGE *next; 00054 int other_end; 00055 double weight; 00056 }pool_edge; 00057 00058 pool_net *create_pool_net PROTO((cnrp_spec_cp *vcp, int varnum, int *indices, 00059 double *values)); 00060 void free_pool_net PROTO((cnrp_spec_cp *vcp)); 00061 00062 00063 #endif