Dip
0.92.4
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
tmp
Dip-0.92.4
SYMPHONY
Applications
VRP
include
vrp_cg.h
Go to the documentation of this file.
1
/*===========================================================================*/
2
/* */
3
/* This file is part of a demonstration application for use with the */
4
/* SYMPHONY Branch, Cut, and Price Library. This application is a solver for */
5
/* the Vehicle Routing Problem and the Traveling Salesman Problem. */
6
/* */
7
/* (c) Copyright 2000-2013 Ted Ralphs. All Rights Reserved. */
8
/* */
9
/* This application was developed by Ted Ralphs (ted@lehigh.edu) */
10
/* */
11
/* This software is licensed under the Eclipse Public License. Please see */
12
/* accompanying file for terms. */
13
/* */
14
/*===========================================================================*/
15
16
#ifndef _VRP_CG_H
17
#define _VRP_CG_H
18
19
/* system include files */
20
#include <stdio.h>
21
22
/* SYMPHONY include files */
23
#include "
sym_types.h
"
24
#include "
sym_proto.h
"
25
26
/* VRP include files */
27
#include "
network.h
"
28
#include "
vrp_cg_params.h
"
29
30
typedef
struct
VRP_CG_PROBLEM
{
31
vrp_cg_params
par
;
32
int
dg_id
;
/*contains the tid of the graphics window*/
33
int
vertnum
;
/*the number of nodes in the problem,
34
including the depot */
35
int
*
demand
;
/* alist of the customer demands*/
36
int
capacity
;
/*the capacity of the trucks*/
37
int
numroutes
;
/*contains the number of routes that the problem
38
is to be solved with. can be prespecified. */
39
int
*
edges
;
/*contains a list of the edges in the current
40
subproblem*/
41
network
*
n
;
42
int
orig_edgenum
;
43
int
*
cost
;
44
int
*
ref
;
/* the last five are for the shrinking routines; */
45
char
*
in_set
;
/* They are here to optimize/speed up things */
46
int
*
new_demand
;
47
double
*
cut_val
;
48
char
*
cut_list
;
49
50
/*__BEGIN_EXPERIMENTAL_SECTION__*/
51
int
*
dec_data
;
52
int
last_decomp_index
;
53
double
last_objval
;
54
FILE *
decomp_res
;
55
/* the next four arrays pertain to storing no-columns cuts - kind of an
56
auxiliary cutpool*/
57
int
**
data
;
58
char
**
indicators
;
59
int
*
ones
;
60
int
*
size
;
61
int
num_nocolscuts
;
62
/*___END_EXPERIMENTAL_SECTION___*/
63
64
#ifdef CHECK_CUT_VALIDITY
65
int
feas_sol_size;
66
int
*feas_sol;
67
#endif
68
}
vrp_cg_problem
;
69
70
/*===========================================================================*/
71
/*========================= Other user subroutines =========================*/
72
/*===========================================================================*/
73
74
void
check_connectivity
PROTO
((
network
*n,
double
etol,
int
capacity,
75
int
numroutes,
cut_data
***cuts,
76
int
*num_cuts,
int
*alloc_cuts));
77
78
/*===========================================================================*/
79
/*=============================== shrink.c ==================================*/
80
/*===========================================================================*/
81
82
void
reduce_graph
PROTO
((
network
*n,
double
etol,
int
*demand));
83
int
greedy_shrinking1
PROTO
((
network
*n,
double
truck_cap,
double
etol,
84
int
max_num_cuts,
cut_data
*new_cut,
85
int
*compnodes,
int
*compmembers,
int
compnum,
86
char
*in_set,
double
*cut_val,
int
*ref,
87
char
*
cut_list
,
int
*demand,
cut_data
***cuts,
88
int
*num_cuts,
int
*alloc_cuts));
89
int
greedy_shrinking6
PROTO
((
network
*n,
double
truck_cap,
90
double
etol,
cut_data
*new_cut,
91
int
*compnodes,
92
int
*compmembers,
int
compnum,
char
*in_set,
93
double
*cut_val,
int
*ref,
char
*
cut_list
,
94
int
max_num_cuts,
int
*demand,
int
trial_num,
95
double
prob,
cut_data
***cuts,
int
*num_cuts,
96
int
*alloc_cuts));
97
int
greedy_shrinking1_one
PROTO
((
network
*n,
double
truck_cap,
98
double
etol,
int
max_num_cuts,
99
cut_data
*new_cut,
char
*in_set,
100
double
*cut_val,
char
*
cut_list
,
101
int
num_routes,
int
*demand,
cut_data
***cuts,
102
int
*num_cuts,
int
*alloc_cuts));
103
int
greedy_shrinking6_one
PROTO
((
network
*n,
double
truck_cap,
104
double
etol,
cut_data
*new_cut,
105
char
*in_set,
double
*cut_val,
int
num_routes,
106
char
*
cut_list
,
int
max_num_cuts,
107
int
*demand,
int
trial_num,
double
prob,
108
cut_data
***cuts,
int
*num_cuts,
109
int
*alloc_cuts));
110
int
greedy_shrinking2_one
PROTO
((
network
*n,
double
truck_cap,
111
double
etol,
cut_data
*new_cut,
112
char
*in_set,
double
*cut_val,
int
num_routes,
113
int
*demand,
cut_data
***cuts,
int
*num_cuts,
114
int
*alloc_cuts));
115
116
/*===========================================================================*/
117
/*============================ biconnected.c ================================*/
118
/*===========================================================================*/
119
120
void
depth_first_search
PROTO
((
vertex
*v,
int
*count1,
int
*count2));
121
int
biconnected
PROTO
((
network
*n,
int
*compnodes,
int
122
*compdemands,
double
*compcuts));
123
void
compute_comp_nums
PROTO
((
vertex
*v,
int
parent_comp,
int
*num_comps,
124
char
parent_is_art_point));
125
126
/*===========================================================================*/
127
/*================================ tsp.c ====================================*/
128
/*===========================================================================*/
129
130
int
tsp_cuts
PROTO
((
network
*n,
int
verbosity
,
char
tsp_prob,
int
which_cuts,
131
cut_data
***cuts,
int
*num_cuts,
int
*alloc_cuts));
132
133
#endif
VRP_CG_PROBLEM::dec_data
int * dec_data
Definition:
vrp_cg.h:51
PROTO
#define PROTO(x)
Definition:
sym_proto.h:27
VRP_CG_PROBLEM::cut_val
double * cut_val
Definition:
vrp_cg.h:47
network.h
VRP_CG_PROBLEM::new_demand
int * new_demand
Definition:
vrp_cg.h:46
VRP_CG_PROBLEM::size
int * size
Definition:
vrp_cg.h:60
VRP_CG_PARAMS
Definition:
vrp_cg_params.h:32
VERTEX
Definition:
network.h:62
VRP_CG_PROBLEM::dg_id
int dg_id
Definition:
vrp_cg.h:32
NETWORK
Definition:
network.h:89
vrp_cg_problem
struct VRP_CG_PROBLEM vrp_cg_problem
VRP_CG_PROBLEM::last_decomp_index
int last_decomp_index
Definition:
vrp_cg.h:52
VRP_CG_PROBLEM::capacity
int capacity
Definition:
vrp_cg.h:36
VRP_CG_PROBLEM::par
vrp_cg_params par
Definition:
vrp_cg.h:31
VRP_CG_PROBLEM::num_nocolscuts
int num_nocolscuts
Definition:
vrp_cg.h:61
VRP_CG_PROBLEM::indicators
char ** indicators
Definition:
vrp_cg.h:58
VRP_CG_PROBLEM::in_set
char * in_set
Definition:
vrp_cg.h:45
sym_proto.h
VRP_CG_PROBLEM::cost
int * cost
Definition:
vrp_cg.h:43
VRP_CG_PROBLEM::decomp_res
FILE * decomp_res
Definition:
vrp_cg.h:54
VRP_CG_PROBLEM::last_objval
double last_objval
Definition:
vrp_cg.h:53
VRP_CG_PROBLEM::ref
int * ref
Definition:
vrp_cg.h:44
OsiUnitTest::verbosity
unsigned int verbosity
Verbosity level of unit tests.
VRP_CG_PROBLEM::edges
int * edges
Definition:
vrp_cg.h:39
VRP_CG_PROBLEM::data
int ** data
Definition:
vrp_cg.h:57
VRP_CG_PROBLEM::numroutes
int numroutes
Definition:
vrp_cg.h:37
VRP_CG_PROBLEM::ones
int * ones
Definition:
vrp_cg.h:59
cut_list
Definition:
Cgl012cut.hpp:167
VRP_CG_PROBLEM
Definition:
vrp_cg.h:30
CUT_DATA
Definition:
sym_types.h:68
VRP_CG_PROBLEM::orig_edgenum
int orig_edgenum
Definition:
vrp_cg.h:42
vrp_cg_params.h
VRP_CG_PROBLEM::demand
int * demand
Definition:
vrp_cg.h:35
VRP_CG_PROBLEM::vertnum
int vertnum
Definition:
vrp_cg.h:33
sym_types.h
VRP_CG_PROBLEM::cut_list
char * cut_list
Definition:
vrp_cg.h:48
VRP_CG_PROBLEM::n
network * n
Definition:
vrp_cg.h:41
Generated by
1.8.5