/home/coin/SVN-release/CoinAll-1.1.0/SYMPHONY/Applications/VRP/include/vrp_cg.h

Go to the documentation of this file.
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_CG_H
00017 #define _VRP_CG_H
00018 
00019 /* system include files */
00020 #include <stdio.h>
00021 
00022 /* SYMPHONY include files */
00023 #include "sym_types.h"
00024 #include "sym_proto.h"
00025 
00026 /* VRP include files */
00027 #include "network.h"
00028 #include "vrp_cg_params.h"
00029 
00030 typedef struct VRP_CG_PROBLEM{
00031    vrp_cg_params par;
00032    int           dg_id;   /*contains the tid of the graphics window*/
00033    int           vertnum;  /*the number of nodes in the problem,
00034                               including the depot                */
00035    int          *demand;   /* alist of the customer demands*/
00036    int           capacity; /*the capacity of the trucks*/
00037    int           numroutes;/*contains the number of routes that the problem
00038                               is to be solved with. can be prespecified.  */
00039    int          *edges;    /*contains a list of the edges in the current
00040                               subproblem*/
00041    network      *n;
00042    int           orig_edgenum;
00043    int          *cost;
00044    int          *ref;      /* the last five  are for the shrinking routines; */
00045    char         *in_set;   /* They are here to optimize/speed up things */
00046    int          *new_demand;
00047    double       *cut_val;
00048    char         *cut_list;
00049 
00050 
00051 #ifdef CHECK_CUT_VALIDITY
00052    int           feas_sol_size;
00053    int          *feas_sol;
00054 #endif
00055 }vrp_cg_problem;
00056 
00057 /*===========================================================================*/
00058 /*========================= Other user subroutines =========================*/
00059 /*===========================================================================*/
00060 
00061 void check_connectivity PROTO((network *n, double etol, int capacity,
00062                               int numroutes, cut_data ***cuts,
00063                               int *num_cuts, int *alloc_cuts));
00064 
00065 /*===========================================================================*/
00066 /*=============================== shrink.c ==================================*/
00067 /*===========================================================================*/
00068 
00069 void reduce_graph PROTO((network *n, double etol, int *demand));
00070 int greedy_shrinking1 PROTO((network *n, double truck_cap, double etol,
00071                              int max_num_cuts, cut_data *new_cut,
00072                              int *compnodes, int *compmembers, int compnum,
00073                              char *in_set, double *cut_val,int *ref,
00074                              char *cut_list, int *demand, cut_data ***cuts,
00075                              int *num_cuts, int *alloc_cuts));
00076 int greedy_shrinking6 PROTO((network *n, double truck_cap,
00077                              double etol, cut_data *new_cut,
00078                              int *compnodes,
00079                              int *compmembers, int compnum, char *in_set,
00080                              double *cut_val,int *ref, char *cut_list,
00081                              int max_num_cuts, int *demand, int trial_num,
00082                              double prob, cut_data ***cuts, int *num_cuts,
00083                              int *alloc_cuts));
00084 int greedy_shrinking1_one PROTO((network *n, double truck_cap,
00085                                  double etol, int max_num_cuts,
00086                                  cut_data *new_cut, char *in_set,
00087                                  double *cut_val, char *cut_list,
00088                                  int num_routes, int *demand, cut_data ***cuts,
00089                                  int *num_cuts, int *alloc_cuts));
00090 int greedy_shrinking6_one PROTO((network *n, double truck_cap,
00091                                  double etol, cut_data *new_cut,
00092                                  char *in_set, double *cut_val, int num_routes,
00093                                  char *cut_list, int max_num_cuts,
00094                                  int *demand,int trial_num, double prob,
00095                                  cut_data ***cuts, int *num_cuts,
00096                                  int *alloc_cuts));
00097 int greedy_shrinking2_one PROTO((network *n, double truck_cap,
00098                                  double etol, cut_data *new_cut,
00099                                  char *in_set, double *cut_val, int num_routes,
00100                                  int *demand, cut_data ***cuts, int *num_cuts,
00101                                  int *alloc_cuts));
00102 
00103 /*===========================================================================*/
00104 /*============================ biconnected.c ================================*/
00105 /*===========================================================================*/
00106 
00107 void depth_first_search PROTO((vertex *v, int *count1, int *count2));
00108 int biconnected PROTO((network *n, int *compnodes, int
00109                            *compdemands, double *compcuts));
00110 void compute_comp_nums PROTO((vertex *v, int parent_comp, int *num_comps,
00111                        char parent_is_art_point));
00112 
00113 /*===========================================================================*/
00114 /*================================ tsp.c ====================================*/
00115 /*===========================================================================*/
00116 
00117 int tsp_cuts PROTO((network *n, int verbosity, char tsp_prob, int which_cuts,
00118                     cut_data ***cuts, int *num_cuts, int *alloc_cuts));
00119 
00120 #endif

Generated on Sun Nov 14 14:06:41 2010 for Coin-All by  doxygen 1.4.7