VRP_ConcordeI.h

Go to the documentation of this file.
00001 //===========================================================================//
00002 // This file is part of the Decomp Solver Framework.                         //
00003 //                                                                           //
00004 // Decomp is distributed under the Common Public License as part of the      //
00005 // COIN-OR repository (http://www.coin-or.org).                              //
00006 //                                                                           //
00007 // Author: Matthew Galati, Lehigh University                                 //
00008 //                                                                           //
00009 // Copyright (C) 2002-2007, Lehigh University, Matthew Galati, and Ted Ralphs//
00010 // All Rights Reserved.                                                      //
00011 //===========================================================================//
00012 
00013 #ifndef VRP_CONCORDEI_INCLUDED
00014 #define VRP_CONCORDEI_INCLUDED
00015 
00016 //---
00017 //--- Interface class to Concorde (TSP solver)
00018 //---     those prototypes from concorde lib that we use
00019 //---
00020 #define CC_TINYTSP_MINIMIZE            (1)
00021 #define CC_TINYTSP_ERROR               -1
00022 #define CC_TINYTSP_SEARCHLIMITEXCEEDED  1
00023 #define CC_TINYTSP_INFEASIBLE           2
00024 #define CCutil_MAXINT       (2147483647)
00025 
00026 extern "C"{
00027    typedef struct CCrandstate {
00028       int a;
00029       int b;
00030       int arr[55];
00031    } CCrandstate;
00032 
00033    typedef struct CCdata_user {
00034       double  *x;
00035       double  *y;
00036    } CCdata_user;
00037 
00038    typedef struct CCdata_rhvector {
00039       int dist_00;
00040       int dist_01;
00041       int dist_02;
00042       int dist_12;
00043       int dist_22;
00044       double p;
00045       int rhlength;
00046       char *space;
00047       char **vectors;
00048    } CCdata_rhvector;
00049 
00050    typedef struct CCdatagroup {
00051       int    (*edgelen) (int i, int j, struct CCdatagroup *dat);
00052       double  *x;
00053       double  *y;
00054       double  *z;
00055       int    **adj;
00056       int     *adjspace;
00057       int    **len;
00058       int     *lenspace;
00059       int     *degree;
00060       int      norm;
00061       int      dsjrand_param;
00062       int      default_len;     /* for edges not in sparse graph   */
00063       int      sparse_ecount;   /* number of edges in sparse graph */
00064       double   gridsize;        /* for toroidal norm */
00065       double   dsjrand_factor;
00066       CCdata_rhvector rhdat;
00067       CCdata_user     userdat;
00068       int      ndepot;          /* used with the subdivision code   */
00069       int      orig_ncount;     /* just ncount-ndepot               */
00070       int     *depotcost;       /* cost from each node to the depot */
00071       int     *orig_names;      /* the nodes names from full problem */
00072    } CCdatagroup;
00073    
00074    void CCutil_sprand (int seed, CCrandstate *r);
00075 
00076    int CCtsp_solve_sparse (int           ncount, 
00077                int           ecount, 
00078                int         * elist, 
00079                int         * elen,
00080                int         * in_tour, 
00081                int         * out_tour, 
00082                double      * in_val, 
00083                double      * optval,
00084                int         * success, 
00085                int         * foundtour, 
00086                char        * name, 
00087                double      * timebound,
00088                int         * hit_timebound, 
00089                int           silent, 
00090                CCrandstate * rstate);
00091 
00092    int CCtsp_solve_dat (int           ncount, 
00093             CCdatagroup * indat, 
00094             int         * in_tour,
00095             int         * out_tour, 
00096             double      * in_val, 
00097             double      * optval, 
00098             int         * success,
00099             int         * foundtour, 
00100             char        * name, 
00101             double      * timebound, 
00102             int         * hit_timebound,
00103             int           silent, 
00104             CCrandstate * rstate);
00105 
00106    int CCutil_graph2dat_matrix (int           ncount,  
00107                 int           ecount, 
00108                 int         * elist, 
00109                 int         * elen,
00110                 int           defaultlen, 
00111                 CCdatagroup * dat);
00112 
00113    int CCtiny_bnc_tsp (int           ncount, 
00114                        CCdatagroup * dat, 
00115                        double      * upbound,
00116                        double      * optval, 
00117                        int           nodelimit);
00118 
00119    int CCtiny_bnc_msp (int ncount, int ecount, int *elist, int *elen, int depot,
00120                        int *lower, int *upper, double *upperbound, int objsense,
00121                        double *optval, int *xsol, int checkresult, int searchlimit);
00122    
00123 
00124 
00125 }
00126 #endif

Generated on 12 Feb 2015 for Dip-All by  doxygen 1.6.1