- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

VrpCutGenerator.h
Go to the documentation of this file.
1 /*===========================================================================*
2 * This file is part of a solver for the Vehicle Routing Problem *
3 * developed using the BiCePS Linear Integer Solver (BLIS). *
4 * *
5 * This solver is distributed under the Eclipse Public License as part of *
6 * the COIN-OR repository (http://www.coin-or.org). *
7 * *
8 * Authors: Yan Xu, Lehigh University *
9 * Ted Ralphs, Lehigh University *
10 * *
11 * Copyright (C) 2007 Yan Xu and Ted Ralphs. *
12 * All Rights Reserved. *
13 *===========================================================================*/
14
15 #ifndef VrpCutGenerator_h_
16 #define VrpCutGenerator_h_
17
18 //#############################################################################
19
20 #include "BlisConGenerator.h"
21 #include "VrpModel.h"
22 #include "VrpNetwork.h"
23 #include "VrpMacros.h"
24 #ifdef DO_TSP_CUTS
25 extern "C"{
26 #include "concorde.h"
27 }
28 #endif
29
30 class VrpModel;
31
32 //#############################################################################
33
34 class VrpCutGenerator : public BlisConGenerator
35 {
36 private:
37
38 VrpModel *model_;
39 char **coef_list;
40 int *ref_;
41 double *cutVal_;
42 char *cutList_;
43 char *inSet_;
44
45 public:
46
48 VrpCutGenerator(VrpModel *vrp=0, int vertnum = 0);
49
51 virtual ~VrpCutGenerator() {
52 delete [] ref_; ref_ = 0;
53 delete [] cutVal_; cutVal_ = 0;
54 delete [] cutList_; cutList_ = 0;
55 delete [] inSet_; inSet_ = 0;
56 }
57
62 virtual bool generateConstraints(BcpsConstraintPool &conPool);
63
64 int connectivityCuts(BcpsConstraintPool &conPool);
65
66 int addVrpCut(BcpsConstraintPool &conPool, char *coef, int rhs,int type);
67
68 void setModel(VrpModel *vrp){ model_ = vrp; }
69
70 int greedyShrinking1(VrpModel *m, int max_shrink_cuts,
71 BcpsConstraintPool &conPool);
72
73 int greedyShrinking1One(VrpModel *m, int max_shrink_cuts,
74 BcpsConstraintPool &conPool);
75
76 int greedyShrinking6(VrpModel *m, int max_shrink_cuts, int trial_num,
77 double prob, BcpsConstraintPool &conPool);
78
79 int greedyShrinking6One(VrpModel *m, int max_shrink_cuts, int trial_num,
80 double prob, BcpsConstraintPool &conPool);
81
82 int greedyShrinking2One(VrpModel *m, int max_shrink_cuts,
83 BcpsConstraintPool &conPool);
84
85 #ifdef DO_TSP_CUTS
86 int tspCuts(VrpModel *m, BcpsConstraintPool &conPool);
87 int addTspCuts(VrpModel *m, BcpsConstraintPool &conPool,
88 CCtsp_lpcut_in **tsp_cuts, CCtsp_lpgraph *g);
89 #endif
90
91 };
92
93 //#############################################################################
94
95 #endif
VrpModel
Model class for VRP.
Definition: VrpModel.h:32
VrpCutGenerator::~VrpCutGenerator
virtual ~VrpCutGenerator()
Destructor.
Definition: VrpCutGenerator.h:51
VrpCutGenerator::greedyShrinking1
int greedyShrinking1(VrpModel *m, int max_shrink_cuts, BcpsConstraintPool &conPool)
VrpCutGenerator::model_
VrpModel * model_
Definition: VrpCutGenerator.h:38
VrpCutGenerator::greedyShrinking6One
int greedyShrinking6One(VrpModel *m, int max_shrink_cuts, int trial_num, double prob, BcpsConstraintPool &conPool)
VrpCutGenerator::greedyShrinking2One
int greedyShrinking2One(VrpModel *m, int max_shrink_cuts, BcpsConstraintPool &conPool)
VrpModel.h
VrpCutGenerator::cutVal_
double * cutVal_
Definition: VrpCutGenerator.h:41
VrpCutGenerator::inSet_
char * inSet_
Definition: VrpCutGenerator.h:43
VrpCutGenerator::generateConstraints
virtual bool generateConstraints(BcpsConstraintPool &conPool)
Generate cons for the client model.
VrpCutGenerator::coef_list
char ** coef_list
Definition: VrpCutGenerator.h:39
VrpCutGenerator::cutList_
char * cutList_
Definition: VrpCutGenerator.h:42
VrpNetwork.h
VrpCutGenerator::connectivityCuts
int connectivityCuts(BcpsConstraintPool &conPool)
BlisConGenerator
Interface between Blis and Cut Generation Library.
Definition: BlisConGenerator.h:56
VrpCutGenerator::setModel
void setModel(VrpModel *vrp)
Definition: VrpCutGenerator.h:68
VrpCutGenerator::greedyShrinking6
int greedyShrinking6(VrpModel *m, int max_shrink_cuts, int trial_num, double prob, BcpsConstraintPool &conPool)
VrpCutGenerator::greedyShrinking1One
int greedyShrinking1One(VrpModel *m, int max_shrink_cuts, BcpsConstraintPool &conPool)
BcpsConstraintPool
Definition: BcpsObjectPool.h:104
VrpCutGenerator::addVrpCut
int addVrpCut(BcpsConstraintPool &conPool, char *coef, int rhs, int type)
VrpCutGenerator::ref_
int * ref_
Definition: VrpCutGenerator.h:40
VrpCutGenerator
Definition: VrpCutGenerator.h:34
VrpCutGenerator::VrpCutGenerator
VrpCutGenerator(VrpModel *vrp=0, int vertnum=0)
Construtors.
VrpMacros.h